YouZum

Committee

AI, Committee, Noticias, Uncategorized

The Download: how AI really works, and phasing out animal testing

This is today’s edition of The Download, our weekday newsletter that provides a daily dose of what’s going on in the world of technology. OpenAI’s new LLM exposes the secrets of how AI really works The news: ChatGPT maker OpenAI has built an experimental large language model that is far easier to understand than typical models. Why it matters: It’s a big deal, because today’s LLMs are black boxes: Nobody fully understands how they do what they do. Building a model that is more transparent sheds light on how LLMs work in general, helping researchers figure out why models hallucinate, why they go off the rails, and just how far we should trust them with critical tasks. Read the full story. —Will Douglas Heaven Google DeepMind is using Gemini to train agents inside Goat Simulator 3 Google DeepMind has built a new video-game-playing agent called SIMA 2 that can navigate and solve problems in 3D virtual worlds. The company claims it’s a big step toward more general-purpose agents and better real-world robots.    The company first demoed SIMA (which stands for “scalable instructable multiworld agent”) last year. But this new version has been built on top of Gemini, the firm’s flagship large language model, which gives the agent a huge boost in capability. Read the full story. —Will Douglas Heaven These technologies could help put a stop to animal testing Earlier this week, the UK’s science minister announced an ambitious plan: to phase out animal testing. Testing potential skin irritants on animals will be stopped by the end of next year. By 2027, researchers are “expected to end” tests of the strength of Botox on mice. And drug tests in dogs and nonhuman primates will be reduced by 2030. It’s good news for activists and scientists who don’t want to test on animals. And it’s timely too: In recent decades, we’ve seen dramatic advances in technologies that offer new ways to model the human body and test the effects of potential therapies, without experimenting on animals. Read the full story. —Jessica Hamzelou This article first appeared in The Checkup, MIT Technology Review’s weekly biotech newsletter. To receive it in your inbox every Thursday, and read articles like this first, sign up here. The must-reads I’ve combed the internet to find you today’s most fun/important/scary/fascinating stories about technology. 1 Chinese hackers used Anthropic’s AI to conduct an espionage campaign   It automated a number of attacks on corporations and governments in September. (WSJ $)+ The AI was able to handle the majority of the hacking workload itself. (NYT $)+ Cyberattacks by AI agents are coming. (MIT Technology Review) 2 Blue Origin successfully launched and landed its New Glenn rocketIt managed to deploy two NASA satellites into space without a hitch. (CNN)+ The New Glenn is the company’s largest reusable rocket. (FT $)+ The launch had been delayed twice before. (WP $) 3 Brace yourself for flu seasonIt started five weeks earlier than usual in the UK, and the US is next. (Ars Technica)+ Here’s why we don’t have a cold vaccine. Yet. (MIT Technology Review) 4 Google is hosting a Border Protection facial recognition app    The app alerts officials whether to contact ICE about identified immigrants. (404 Media)+ Another effort to track ICE raids was just taken offline. (MIT Technology Review) 5 OpenAI is trialling group chats in ChatGPTIt’d essentially make AI a participant in a conversation of up to 20 people. (Engadget) 6 A TikTok stunt sparked debate over how charitable America’s churches really areContent creator Nikalie Monroe asked churches for help feeding her baby. Very few stepped up. (WP $) 7 Indian startups are attempting to tackle air pollutionBut their solutions are far beyond the means of the average Indian household. (NYT $)+ OpenAI is huge in India. Its models are steeped in caste bias. (MIT Technology Review) 8 An AI tool could help reduce wasted efforts to transplant organsIt predicts how likely the would-be recipient is to die during the brief transplantation window. (The Guardian)+ Putin says organ transplants could grant immortality. Not quite. (MIT Technology Review) 9 3D-printing isn’t making prosthetics more affordableIt turns out that plastic prostheses are often really uncomfortable. (IEEE Spectrum)+ These prosthetics break the mold with third thumbs, spikes, and superhero skins. (MIT Technology Review) 10 What happens when relationships with AI fall apartCan you really file for divorce from an LLM? (Wired $)+ It’s surprisingly easy to stumble into a relationship with an AI chatbot. (MIT Technology Review) Quote of the day “It’s a funky time.” —Aileen Lee, founder and managing partner of Cowboy Ventures, tells TechCrunch the AI boom has torn up the traditional investment rulebook. One more thing Restoring an ancient lake from the rubble of an unfinished airport in Mexico City Weeks after Mexican President Andrés Manuel López Obrador took office in 2018, he controversially canceled ambitious plans to build an airport on the deserted site of the former Lake Texcoco—despite the fact it was already around a third complete. Instead, he tasked Iñaki Echeverria, a Mexican architect and landscape designer, with turning it into a vast urban park, an artificial wetland that aims to transform the future of the entire Valley region. But as López Obrador’s presidential team nears its end, the plans for Lake Texcoco’s rebirth could yet vanish. Read the full story. —Matthew Ponsford We can still have nice things A place for comfort, fun and distraction to brighten up your day. (Got any ideas? Drop me a line or skeet ’em at me.) + Maybe Gen Z is onto something when it comes to vibe dating.+ Trust AC/DC to give the fans what they want, performing Jailbreak for the first time since 1991.+ Nieves González, the artist behind Lily Allen’s new album cover, has an eye for detail.+ Here’s what AI determines is a catchy tune.

The Download: how AI really works, and phasing out animal testing Leer entrada »

AI, Committee, Noticias, Uncategorized

OpenAI Researchers Train Weight Sparse Transformers to Expose Interpretable Circuits

If neural networks are now making decisions everywhere from code editors to safety systems, how can we actually see the specific circuits inside that drive each behavior? OpenAI has introduced a new mechanistic interpretability research study that trains language models to use sparse internal wiring, so that model behavior can be explained using small, explicit circuits. https://cdn.openai.com/pdf/41df8f28-d4ef-43e9-aed2-823f9393e470/circuit-sparsity-paper.pdf Training transformers to be weight sparse Most transformer language models are dense. Each neuron reads from and writes to many residual channels, and features are often in superposition. This makes circuit level analysis difficult. Previous OpenAI work tried to learn sparse feature bases on top of dense models using sparse autoencoders. The new research work instead changes the base model so that the transformer itself is weight sparse. The OpenAI team trains decoder only transformers with an architecture similar to GPT 2. After each optimizer step with AdamW optimizer, they enforce a fixed sparsity level on every weight matrix and bias, including token embeddings. Only the largest magnitude entries in each matrix are kept. The rest are set to zero. Over training, an annealing schedule gradually drives the fraction of non zero parameters down until the model reaches a target sparsity. In the most extreme setting, roughly 1 in 1000 weights is non zero. Activations are also somewhat sparse. Around 1 in 4 activations are non zero at a typical node location. The effective connectivity graph is therefore very thin even when the model width is large. This encourages disentangled features that map cleanly onto the residual channels the circuit uses. https://cdn.openai.com/pdf/41df8f28-d4ef-43e9-aed2-823f9393e470/circuit-sparsity-paper.pdf Measuring interpretability through task specific pruning To quantify whether these models are easier to understand, OpenAI team does not rely on qualitative examples alone. The research team define a suite of simple algorithmic tasks based on Python next token prediction. One example, single_double_quote, requires the model to close a Python string with the right quote character. Another example, set_or_string, requires the model to choose between .add and += based on whether a variable was initialized as a set or a string. For each task, they search for the smallest subnetwork, called a circuit, that can still perform the task up to a fixed loss threshold. The pruning is node based. A node is an MLP neuron at a specific layer, an attention head, or a residual stream channel at a specific layer. When a node is pruned, its activation is replaced by its mean over the pretraining distribution. This is mean ablation. The search uses continuous mask parameters for each node and a Heaviside style gate, optimized with a straight through estimator like surrogate gradient. The complexity of a circuit is measured as the count of active edges between retained nodes. The main interpretability metric is the geometric mean of edge counts across all tasks. Example circuits in sparse transformers On the single_double_quote task, the sparse models yield a compact and fully interpretable circuit. In an early MLP layer, one neuron behaves as a quote detector that activates on both single and double quotes. A second neuron behaves as a quote type classifier that distinguishes the two quote types. Later, an attention head uses these signals to attend back to the opening quote position and copy its type to the closing position. In circuit graph terms, the mechanism uses 5 residual channels, 2 MLP neurons in layer 0, and 1 attention head in a later layer with a single relevant query key channel and a single value channel. If the rest of the model is ablated, this subgraph still solves the task. If these few edges are removed, the model fails on the task. The circuit is therefore both sufficient and necessary in the operational sense defined by the paper. https://cdn.openai.com/pdf/41df8f28-d4ef-43e9-aed2-823f9393e470/circuit-sparsity-paper.pdf For more complex behaviors, such as type tracking of a variable named current inside a function body, the recovered circuits are larger and only partially understood. The research team show an example where one attention operation writes the variable name into the token set() at the definition, and another attention operation later copies the type information from that token back into a later use of current. This still yields a relatively small circuit graph. Key Takeaways Weight-sparse transformers by design: OpenAI trains GPT-2 style decoder only transformers so that almost all weights are zero, around 1 in 1000 weights is non zero, enforcing sparsity across all weights and biases including token embeddings, which yields thin connectivity graphs that are structurally easier to analyze. Interpretability is measured as minimal circuit size: The work defines a benchmark of simple Python next token tasks and, for each task, searches for the smallest subnetwork, in terms of active edges between nodes, that still reaches a fixed loss, using node level pruning with mean ablation and a straight through estimator style mask optimization. Concrete, fully reverse engineered circuits emerge: On tasks such as predicting matching quote characters, the sparse model yields a compact circuit with a few residual channels, 2 key MLP neurons and 1 attention head that the authors can fully reverse engineer and verify as both sufficient and necessary for the behavior. Sparsity delivers much smaller circuits at fixed capability: At matched pre-training loss levels, weight sparse models require circuits that are roughly 16 times smaller than those recovered from dense baselines, defining a capability interpretability frontier where increased sparsity improves interpretability while slightly reducing raw capability. Editorial Comments OpenAI’s work on weight sparse transformers is a pragmatic step toward making mechanistic interpretability operational. By enforcing sparsity directly in the base model, the paper turns abstract discussions of circuits into concrete graphs with measurable edge counts, clear necessity and sufficiency tests, and reproducible benchmarks on Python next token tasks. The models are small and inefficient, but the methodology is relevant for future safety audits and debugging workflows. This research treats interpretability as a first class design constraint rather than an after the fact diagnostic. Check out the Paper, GitHub Repo and Technical details. Feel free to check out our GitHub Page for Tutorials, Codes and

OpenAI Researchers Train Weight Sparse Transformers to Expose Interpretable Circuits Leer entrada »

AI, Committee, Noticias, Uncategorized

ScaleFormer: Span Representation Cumulation for Long-Context Transformer

arXiv:2511.10029v1 Announce Type: new Abstract: The quadratic complexity of standard self-attention severely limits the application of Transformer-based models to long-context tasks. While efficient Transformer variants exist, they often require architectural changes and costly pre-training from scratch. To circumvent this, we propose ScaleFormer(Span Representation Cumulation for Long-Context Transformer) – a simple and effective plug-and-play framework that adapts off-the-shelf pre-trained encoder-decoder models to process long sequences without requiring architectural modifications. Our approach segments long inputs into overlapping chunks and generates a compressed, context-aware representation for the decoder. The core of our method is a novel, parameter-free fusion mechanism that endows each chunk’s representation with structural awareness of its position within the document. It achieves this by enriching each chunk’s boundary representations with cumulative context vectors from all preceding and succeeding chunks. This strategy provides the model with a strong signal of the document’s narrative flow, achieves linear complexity, and enables pre-trained models to reason effectively over long-form text. Experiments on long-document summarization show that our method is highly competitive with and often outperforms state-of-the-art approaches without requiring architectural modifications or external retrieval mechanisms.

ScaleFormer: Span Representation Cumulation for Long-Context Transformer Leer entrada »

AI, Committee, Noticias, Uncategorized

OutSafe-Bench: A Benchmark for Multimodal Offensive Content Detection in Large Language Models

arXiv:2511.10287v1 Announce Type: cross Abstract: Since Multimodal Large Language Models (MLLMs) are increasingly being integrated into everyday tools and intelligent agents, growing concerns have arisen regarding their possible output of unsafe contents, ranging from toxic language and biased imagery to privacy violations and harmful misinformation. Current safety benchmarks remain highly limited in both modality coverage and performance evaluations, often neglecting the extensive landscape of content safety. In this work, we introduce OutSafe-Bench, the first most comprehensive content safety evaluation test suite designed for the multimodal era. OutSafe-Bench includes a large-scale dataset that spans four modalities, featuring over 18,000 bilingual (Chinese and English) text prompts, 4,500 images, 450 audio clips and 450 videos, all systematically annotated across nine critical content risk categories. In addition to the dataset, we introduce a Multidimensional Cross Risk Score (MCRS), a novel metric designed to model and assess overlapping and correlated content risks across different categories. To ensure fair and robust evaluation, we propose FairScore, an explainable automated multi-reviewer weighted aggregation framework. FairScore selects top-performing models as adaptive juries, thereby mitigating biases from single-model judgments and enhancing overall evaluation reliability. Our evaluation of nine state-of-the-art MLLMs reveals persistent and substantial safety vulnerabilities, underscoring the pressing need for robust safeguards in MLLMs.

OutSafe-Bench: A Benchmark for Multimodal Offensive Content Detection in Large Language Models Leer entrada »

AI, Committee, Noticias, Uncategorized

PustakAI: Curriculum-Aligned and Interactive Textbooks Using Large Language Models

arXiv:2511.10002v1 Announce Type: new Abstract: Large Language Models (LLMs) have demonstrated remarkable capabilities in understanding and generating human-like content. This has revolutionized various sectors such as healthcare, software development, and education. In education, LLMs offer potential for personalized and interactive learning experiences, especially in regions with limited teaching resources. However, adapting these models effectively to curriculum-specific content, such as the National Council of Educational Research and Training (NCERT) syllabus in India, presents unique challenges in terms of accuracy, alignment, and pedagogical relevance. In this paper, we present the framework “PustakAI”footnote{Pustak means `book’ in many Indian languages.} for the design and evaluation of a novel question-answering dataset “NCERT-QA” aligned with the NCERT curriculum for English and Science subjects of grades 6 to 8. We classify the curated QA pairs as Factoid, Inferential, and Others (evaluative and reasoning). We evaluate the dataset with various prompting techniques, such as meta-prompt, few-shot, and CoT-style prompting, using diverse evaluation metrics to understand which approach aligns more efficiently with the structure and demands of the curriculum. Along with the usability of the dataset, we analyze the strengths and limitations of current open-source LLMs (Gemma3:1b, Llama3.2:3b, and Nemotron-mini:4b) and high-end LLMs (Llama-4-Scout-17B and Deepseek-r1-70B) as AI-based learning tools in formal education systems.

PustakAI: Curriculum-Aligned and Interactive Textbooks Using Large Language Models Leer entrada »

AI, Committee, Noticias, Uncategorized

Collapse of Irrelevant Representations (CIR) Ensures Robust and Non-Disruptive LLM Unlearning

arXiv:2509.11816v2 Announce Type: replace-cross Abstract: Current unlearning and safety training methods consistently fail to remove dangerous knowledge from language models. We identify the root cause – unlearning targets representations which are too general – and develop a highly selective technique that unlearns robustly while preserving general performance. Our method performs PCA on activations and module-output gradients to identify subspaces containing common representations, then collapses these subspaces before computing unlearning updates, a technique we term Collapse of Irrelevant Representations (CIR). This avoids unlearning general knowledge and targets only representations specific to the facts being unlearned. When unlearning bio- and cyber-hazardous facts from Llama-3.1-8B, we achieve over 30x greater reduction in post-attack accuracy than the best baseline (Circuit Breakers), while disrupting general performance 30x less, and using less than 3 GPU-seconds per fact. Thus, by disentangling harmful and benign capabilities at the level of representations, CIR enables robust and non-disruptive unlearning.

Collapse of Irrelevant Representations (CIR) Ensures Robust and Non-Disruptive LLM Unlearning Leer entrada »

AI, Committee, Noticias, Uncategorized

NVIDIA AI Introduces TiDAR: A Hybrid Diffusion Autoregressive Architecture For High Throughput LLM Inference

How far can we push large language model speed by reusing “free” GPU compute, without giving up autoregressive level output quality? NVIDIA researchers propose TiDAR, a sequence level hybrid language model that drafts tokens with diffusion and samples them autoregressively in a single forward pass. The main goal of this research is to reach autoregressive quality while significantly increasing throughput by exploiting free token slots on modern GPUs. https://arxiv.org/pdf/2511.08923 Systems motivation, free token slots and the quality problem Autoregressive transformers decode one token per step. At realistic batch sizes, decoding is usually memory bound, because latency is dominated by loading weights and KV cache, not by floating point operations. Increasing the number of tokens in the input sequence within the memory bound region does not change latency much, since the same parameters and cache are reused. Masked diffusion language models already exploit this. Given a prefix, they can append multiple masked positions and predict several tokens in parallel in one denoising step. The research team calls these additional positions free token slots, because profiling shows that sending more tokens in this regime barely changes the forward time. However, diffusion LLMs like Dream and Llada still underperform strong autoregressive baselines on quality. When these models decode multiple tokens in the same step, they sample each token independently from a marginal distribution, given a noised context. This intra step token independence hurts sequence level coherence and factual correctness, and the best quality is usually obtained when decoding only 1 token per step. In practice, this removes much of the theoretical speed advantage of diffusion decoding. TiDAR is designed to preserve the compute efficiency of diffusion while recovering autoregressive quality, using a single backbone and standard transformer infrastructure. Architecture, dual mode backbone and attention masks At a high level, TiDAR partitions the sequence at each generation step into three sections: A prefix of accepted tokens. Tokens drafted in the previous step. Mask tokens that will hold pre drafted candidates for the next step. The model applies a structured attention mask across this sequence. Prefix tokens attend causally, which supports chain factorized next token prediction, as in a standard autoregressive transformer. Tokens in the drafting region and mask region attend bidirectionally within a block, which enables diffusion style marginal predictions over many positions in parallel. This layout is a modification of the Block Diffusion mask, where only the decoding block is bidirectional and the rest of the sequence remains causal. https://arxiv.org/pdf/2511.08923 To enable both modes in the same backbone, TiDAR doubles the sequence length at training time. The original input occupies the causal section, and a corrupted copy occupies the diffusion section. In the causal section, labels are shifted by 1 token to match the next token prediction objective. In the diffusion section, labels are aligned with the input positions. Crucially, TiDAR uses a full mask strategy. All tokens in the diffusion section are replaced by a special mask token, rather than sampling a sparse corruption pattern. This makes the diffusion loss dense, keeps the number of loss terms in diffusion and autoregressive parts equal to the sequence length, and simplifies balancing the two losses with a single weighting factor. The research team set this weighting factor to 1 in most experiments. https://arxiv.org/pdf/2511.08923 Self speculative generation in one forward pass Generation is formulated as a self speculative process that runs in a single network function evaluation per step. Step 1, given the prompt, TiDAR encodes the prefix causally and performs one step diffusion over the mask positions, producing a block of drafted tokens. Step 2 and later steps, each forward pass performs two operations at once Verification of drafted tokens using autoregressive logits over the extended prefix with a rejection sampling rule, similar in spirit to speculative decoding. Pre drafting of the next block using diffusion, conditioned on all possible acceptance outcomes of the current step. Accepted tokens are added to the prefix, and their KV cache entries are retained. Rejected tokens are discarded, and their cache entries are evicted. The drafting and verification share the same backbone and attention mask, so diffusion computation uses the free token slots in the same forward pass. The model supports two sampling modes, trusting autoregressive predictions or trusting diffusion predictions, which control how strongly the final sample follows each head. Experiments show that for the 8B model, trusting diffusion predictions is often beneficial, especially on math benchmarks, while retaining autoregressive quality through rejection sampling. On the systems side, the attention layout and number of tokens per step are fixed. TiDAR pre initialises a block attention mask and reuses slices of this mask across decoding steps using Flex Attention. The architecture supports exact KV cache, like Block Diffusion. The implementation never recomputes KV entries for accepted tokens and introduces no extra inference time hyperparameters. Training recipe and model sizes TiDAR is instantiated by continual pretraining from Qwen2.5 1.5B and Qwen3 4B and 8B base models. The 1.5B variant is trained on 50B tokens with block sizes 4, 8 and 16. The 8B variant is trained on 150B tokens with block size 16. Both use maximum sequence length 4096, cosine learning rate schedule, distributed Adam, BF16, and a modified Megatron LM framework with Torchtitan on NVIDIA H100 GPUs. Evaluation covers coding tasks HumanEval, HumanEval Plus, MBPP, MBPP Plus, math tasks GSM8K and Minerva Math, factual and commonsense tasks MMLU, ARC, Hellaswag, PIQA, and Winogrande, all implemented via lm_eval_harness. Quality and throughput results On generative coding and math tasks, TiDAR 1.5B is highly competitive with its autoregressive counterpart, while generating an average 7.45 tokens per model forward. TiDAR 8B incurs only minimal quality loss relative to Qwen3 8B while increasing generation efficiency to 8.25 tokens per forward pass. On knowledge and reasoning benchmarks evaluated by likelihood, TiDAR 1.5B and 8B match the overall behaviour of comparable autoregressive models, because likelihood is computed with a pure causal mask. Diffusion baselines such as Dream, Llada and Block Diffusion require Monte Carlo based likelihood estimators, which are more expensive and less directly

NVIDIA AI Introduces TiDAR: A Hybrid Diffusion Autoregressive Architecture For High Throughput LLM Inference Leer entrada »

AI, Committee, Noticias, Uncategorized

How to Build a Fully Functional Custom GPT-style Conversational AI Locally Using Hugging Face Transformers

In this tutorial, we build our own custom GPT-style chat system from scratch using a local Hugging Face model. We start by loading a lightweight instruction-tuned model that understands conversational prompts, then wrap it inside a structured chat framework that includes a system role, user memory, and assistant responses. We define how the agent interprets context, constructs messages, and optionally uses small built-in tools to fetch local data or simulated search results. By the end, we have a fully functional, conversational model that behaves like a personalized GPT running. Check out the FULL CODES here.  Copy CodeCopiedUse a different Browser !pip install transformers accelerate sentencepiece –quiet import torch from transformers import AutoTokenizer, AutoModelForCausalLM from typing import List, Tuple, Optional import textwrap, json, os We begin by installing the essential libraries and importing the required modules. We ensure that the environment has all necessary dependencies, such as transformers, torch, and sentencepiece, ready for use. This setup allows us to work seamlessly with Hugging Face models inside Google Colab. Check out the FULL CODES here.  Copy CodeCopiedUse a different Browser MODEL_NAME = “microsoft/Phi-3-mini-4k-instruct” BASE_SYSTEM_PROMPT = ( “You are a custom GPT running locally. ” “Follow user instructions carefully. ” “Be concise and structured. ” “If something is unclear, say it is unclear. ” “Prefer practical examples over corporate examples unless explicitly asked. ” “When asked for code, give runnable code.” ) MAX_NEW_TOKENS = 256 We configure our model name, define the system prompt that governs the assistant’s behavior, and set token limits. We establish how our custom GPT should respond, concise, structured, and practical. This section defines the foundation of our model’s identity and instruction style. Check out the FULL CODES here.  Copy CodeCopiedUse a different Browser print(“Loading model…”) tokenizer = AutoTokenizer.from_pretrained(MODEL_NAME) if tokenizer.pad_token_id is None: tokenizer.pad_token_id = tokenizer.eos_token_id model = AutoModelForCausalLM.from_pretrained( MODEL_NAME, torch_dtype=torch.float16 if torch.cuda.is_available() else torch.float32, device_map=”auto” ) model.eval() print(“Model loaded.”) We load the tokenizer and model from Hugging Face into memory and prepare them for inference. We automatically adjust the device mapping based on available hardware, ensuring GPU acceleration if possible. Once loaded, our model is ready to generate responses. Check out the FULL CODES here.  Copy CodeCopiedUse a different Browser ConversationHistory = List[Tuple[str, str]] history: ConversationHistory = [(“system”, BASE_SYSTEM_PROMPT)] def wrap_text(s: str, w: int = 100) -> str: return “n”.join(textwrap.wrap(s, width=w)) def build_chat_prompt(history: ConversationHistory, user_msg: str) -> str: prompt_parts = [] for role, content in history: if role == “system”: prompt_parts.append(f”<|system|>n{content}n”) elif role == “user”: prompt_parts.append(f”<|user|>n{content}n”) elif role == “assistant”: prompt_parts.append(f”<|assistant|>n{content}n”) prompt_parts.append(f”<|user|>n{user_msg}n”) prompt_parts.append(“<|assistant|>n”) return “”.join(prompt_parts) We initialize the conversation history, starting with a system role, and create a prompt builder to format messages. We define how user and assistant turns are arranged in a consistent conversational structure. This ensures the model always understands the dialogue context correctly. Check out the FULL CODES here.  Copy CodeCopiedUse a different Browser def local_tool_router(user_msg: str) -> Optional[str]: msg = user_msg.strip().lower() if msg.startswith(“search:”): query = user_msg.split(“:”, 1)[-1].strip() return f”Search results about ‘{query}’:n- Key point 1n- Key point 2n- Key point 3″ if msg.startswith(“docs:”): topic = user_msg.split(“:”, 1)[-1].strip() return f”Documentation extract on ‘{topic}’:n1. The agent orchestrates tools.n2. The model consumes output.n3. Responses become memory.” return None We add a lightweight tool router that extends our GPT’s capability to simulate tasks like search or documentation retrieval. We define logic to detect special prefixes such as “search:” or “docs:” in user queries. This simple agentic design gives our assistant contextual awareness. Check out the FULL CODES here.  Copy CodeCopiedUse a different Browser def generate_reply(history: ConversationHistory, user_msg: str) -> str: tool_context = local_tool_router(user_msg) if tool_context: user_msg = user_msg + “nnUseful context:n” + tool_context prompt = build_chat_prompt(history, user_msg) inputs = tokenizer(prompt, return_tensors=”pt”).to(model.device) with torch.no_grad(): output_ids = model.generate( **inputs, max_new_tokens=MAX_NEW_TOKENS, do_sample=True, top_p=0.9, temperature=0.6, pad_token_id=tokenizer.eos_token_id ) decoded = tokenizer.decode(output_ids[0], skip_special_tokens=True) reply = decoded.split(“<|assistant|>”)[-1].strip() if “<|assistant|>” in decoded else decoded[len(prompt):].strip() history.append((“user”, user_msg)) history.append((“assistant”, reply)) return reply def save_history(history: ConversationHistory, path: str = “chat_history.json”) -> None: data = [{“role”: r, “content”: c} for (r, c) in history] with open(path, “w”) as f: json.dump(data, f, indent=2) def load_history(path: str = “chat_history.json”) -> ConversationHistory: if not os.path.exists(path): return [(“system”, BASE_SYSTEM_PROMPT)] with open(path, “r”) as f: data = json.load(f) return [(item[“role”], item[“content”]) for item in data] We define the primary reply generation function, which combines history, context, and model inference to produce coherent outputs. We also add functions to save and load past conversations for persistence. This snippet forms the operational core of our custom GPT. Check out the FULL CODES here.  Copy CodeCopiedUse a different Browser print(“n— Demo turn 1 —“) demo_reply_1 = generate_reply(history, “Explain what this custom GPT setup is doing in 5 bullet points.”) print(wrap_text(demo_reply_1)) print(“n— Demo turn 2 —“) demo_reply_2 = generate_reply(history, “search: agentic ai with local models”) print(wrap_text(demo_reply_2)) def interactive_chat(): print(“nChat ready. Type ‘exit’ to stop.”) while True: try: user_msg = input(“nUser: “).strip() except EOFError: break if user_msg.lower() in (“exit”, “quit”, “q”): break reply = generate_reply(history, user_msg) print(“nAssistant:n” + wrap_text(reply)) # interactive_chat() print(“nCustom GPT initialized successfully.”) We test the entire setup by running demo prompts and displaying generated responses. We also create an optional interactive chat loop to converse directly with the assistant. By the end, we confirm that our custom GPT runs locally and responds intelligently in real time. In conclusion, we designed and executed a custom conversational agent that mirrors GPT-style reasoning without relying on any external services. We saw how local models can be made interactive through prompt orchestration, lightweight tool routing, and conversational memory management. This approach enables us to understand the internal logic behind commercial GPT systems. It empowers us to experiment with our own rules, behaviors, and integrations in a transparent and fully offline manner. Check out the FULL CODES here. Feel free to check out our GitHub Page for Tutorials, Codes and Notebooks. Also, feel free to follow us on Twitter and don’t forget to join our 100k+ ML SubReddit and Subscribe to our Newsletter. Wait! are you on telegram? now you can join us on telegram as well. The post How to Build a Fully Functional Custom GPT-style Conversational AI Locally Using Hugging Face Transformers appeared first on MarkTechPost.

How to Build a Fully Functional Custom GPT-style Conversational AI Locally Using Hugging Face Transformers Leer entrada »

AI, Committee, Noticias, Uncategorized

HalluClean: A Unified Framework to Combat Hallucinations in LLMs

arXiv:2511.08916v1 Announce Type: new Abstract: Large language models (LLMs) have achieved impressive performance across a wide range of natural language processing tasks, yet they often produce hallucinated content that undermines factual reliability. To address this challenge, we introduce HalluClean, a lightweight and task-agnostic framework for detecting and correcting hallucinations in LLM-generated text. HalluClean adopts a reasoning-enhanced paradigm, explicitly decomposing the process into planning, execution, and revision stages to identify and refine unsupported claims. It employs minimal task-routing prompts to enable zero-shot generalization across diverse domains, without relying on external knowledge sources or supervised detectors. We conduct extensive evaluations on five representative tasks-question answering, dialogue, summarization, math word problems, and contradiction detection. Experimental results show that HalluClean significantly improves factual consistency and outperforms competitive baselines, demonstrating its potential to enhance the trustworthiness of LLM outputs in real-world applications.

HalluClean: A Unified Framework to Combat Hallucinations in LLMs Leer entrada »

AI, Committee, Noticias, Uncategorized

Benevolent Dictators? On LLM Agent Behavior in Dictator Games

arXiv:2511.08721v1 Announce Type: cross Abstract: In behavioral sciences, experiments such as the ultimatum game are conducted to assess preferences for fairness or self-interest of study participants. In the dictator game, a simplified version of the ultimatum game where only one of two players makes a single decision, the dictator unilaterally decides how to split a fixed sum of money between themselves and the other player. Although recent studies have explored behavioral patterns of AI agents based on Large Language Models (LLMs) instructed to adopt different personas, we question the robustness of these results. In particular, many of these studies overlook the role of the system prompt – the underlying instructions that shape the model’s behavior – and do not account for how sensitive results can be to slight changes in prompts. However, a robust baseline is essential when studying highly complex behavioral aspects of LLMs. To overcome previous limitations, we propose the LLM agent behavior study (LLM-ABS) framework to (i) explore how different system prompts influence model behavior, (ii) get more reliable insights into agent preferences by using neutral prompt variations, and (iii) analyze linguistic features in responses to open-ended instructions by LLM agents to better understand the reasoning behind their behavior. We found that agents often exhibit a strong preference for fairness, as well as a significant impact of the system prompt on their behavior. From a linguistic perspective, we identify that models express their responses differently. Although prompt sensitivity remains a persistent challenge, our proposed framework demonstrates a robust foundation for LLM agent behavior studies. Our code artifacts are available at https://github.com/andreaseinwiller/LLM-ABS.

Benevolent Dictators? On LLM Agent Behavior in Dictator Games Leer entrada »

We use cookies to improve your experience and performance on our website. You can learn more at Política de privacidad and manage your privacy settings by clicking Settings.

Privacy Preferences

You can choose your cookie settings by turning on/off each type of cookie as you wish, except for essential cookies.

Allow All
Manage Consent Preferences
  • Always Active

Save
es_ES