Fine-tuning massive LLMs used to be painfully slow. Or downright impossible (memory constraints 🫠). Not anymore. Fine-tuning generative LLMs like Llama, Mistral, Gemma, and Qwen models are now possible without a huge budget and crazy compute. And it can be done open source. 🥹 Here are 4 OS packages to help you fine-tune generative LLMs: 🦥 Unsloth: Rapid and memory-efficient fine-tuning of generative OS models like Llama, Mistral, and Gemma. ‣ Fast fine-tuning for Llama, Mistral, Gemma models (updated frequently) ‣ Works in a Colab notebook ‣ Can be used to fine-tune adapters only (when memory prohibits model merging) 🚀 DeepSpeed: Fine-tunes extremely large LLMs exceeding typical memory constraints. ‣ Distributed training across multiple GPUs or nodes ‣ Great for quick inference and training 🦀 Axolotl: Streamlined fine-tuning of generative OS models like Llama and Mistral, with a focus on PEFT techniques. ‣ Simple config process (YAML-based) ‣ User-friendly PEFT (LoRA, QLoRA) ‣ Supports easy fine-tuning for HuggingFace models 🦙 LLaMA Factory: Fine-tune 100+ LLMs and VLMs (Vision Language Models) with scalable resources and PEFT techniques. ‣ Align models with integrated RLHF and Preference Optimization methods ‣ Full fine-tuning or PEFT fine-tuning 🔮 Is the future of fine-tuning open source? These libraries may give us a hint ;)
AI Language Processing
Explore top LinkedIn content from expert professionals.
-
-
When you ask an LLM a question, it does not write the full answer in one shot. It goes step by step. Let’s take a simple prompt: “What is gravity?” Step 1: The model receives your text. At this point, it is just normal human language. Step 2: The text is broken into smaller pieces. These pieces are called tokens. A token can be a word, part of a word, or a symbol. For example: What is grav ity ? Step 3: Each token is converted into a number. The model cannot directly understand text. So every token gets a token ID. Now the sentence has become a list of numbers. Step 4: Those numbers are converted into vectors. A vector is just a long list of numbers that represents meaning. This helps the model understand that some words are related to each other. For example, “gravity” is closer to ideas like force, mass, earth, and physics. Step 5: These vectors go through many processing blocks. These blocks are called transformer layers. You can think of each layer as one round of thinking. In every round, the model asks: Which words matter here? Which tokens are related? What context should I remember? For example, if the prompt is long, the model needs to know which earlier words are important for the next word. This is where attention is used. Attention helps the model focus on the right parts of the input. Step 6: After many such layers, the model creates a final internal understanding of the prompt. It still has not written the answer. It has only prepared the context. Step 7: Now the model predicts the next token. It looks at all possible tokens in its vocabulary and gives each one a probability. For example, after “Gravity is a”, the model may think: force → very likely concept → possible banana → unlikely Step 8: A sampling method chooses the next token. Sometimes it picks the most likely token. Sometimes it picks from a group of likely tokens. This is why the same prompt can sometimes produce slightly different answers. Step 9: The selected token is added to the output. Then the model repeats the same process again. It predicts the next token. Then the next. Then the next. That is why the answer appears word by word on the screen. So the full flow looks like this: Text → tokens → token IDs → vectors → processing layers → probabilities → next token → repeat → final answer This is also why LLM performance is not only about the model. It is also about inference. How fast tokens are processed. How memory is used. How previous context is cached. How decoding happens one token at a time. Once you understand this pipeline, LLMs feel less mysterious. They become easier to debug, optimize, and build with.
-
We benchmarked 15 LLM models on finding real vulnerabilities. The results surprised us. Everyone talks about AI for security. We wanted numbers. We built an automated pentesting harness and pointed 15 different LLMs at OWASP Juice Shop — same target, same tools, same sandbox. Each model got source code access and a running instance. No hand-holding, no prompt engineering tricks. Just: "find vulnerabilities." Here's what we found after 38 runs: The leaderboard isn't what you'd expect. - Kimi K3 (Moonshot) found 62 vulnerabilities — more than any Claude or GPT model - Grok 4.5 (xAI) hit 59 findings in just 26 minutes — the best speed/quality ratio - Claude Opus 4.5 took 3rd place (57 findings), but the current flagship Opus 4.8 ranked 11th with only 26 - GLM 5.2 (Zhipu) achieved the lowest cost per finding: $0.007 — yes, less than a penny per vulnerability The cost story is wild: GLM 5.2 spent $0.32 total and found MORE vulnerabilities than Claude Opus 4.8 at $2.28. The most expensive model per finding (Opus 4.1 at $0.14/finding) found 3x fewer issues than the cheapest (GLM at $0.007/finding). What actually matters isn't the model — it's the harness. Our minimal-prompt harness (just "find vulnerabilities" + sandboxed tools) consistently outperformed the 900-line methodology prompt we spent weeks engineering. The tooling and verification loop carry quality. The model provides the intelligence, but the framework determines whether that intelligence is directed effectively. Three takeaways for anyone building AI security tools: 1. Don't assume the most expensive model wins. Benchmark your actual task. 2. Non-Western AI labs are producing surprisingly strong security-capable models. 3. The orchestration layer matters more than the model layer. Invest in tools, sandboxing, and verification — not just prompt engineering. Full benchmark data in the attached image. #AISecurity #Cybersecurity #LLM #PenetrationTesting #AIBenchmark #InfoSec #Aurascape #GLM #KIMI #KIMIK3 #Deepseek #Grok #Anthropic #OpenAI #Gemini
-
To Believe or Not to Believe Your LLM We explore uncertainty quantification in large language models (LLMs), with the goal to identify when uncertainty in responses given a query is large. We simultaneously consider both epistemic and aleatoric uncertainties, where the former comes from the lack of knowledge about the ground truth (such as about facts or the language), and the latter comes from irreducible randomness (such as multiple possible answers). In particular, we derive an information-theoretic metric that allows to reliably detect when only epistemic uncertainty is large, in which case the output of the model is unreliable. This condition can be computed based solely on the output of the model obtained simply by some special iterative prompting based on the previous responses. Such quantification, for instance, allows to detect hallucinations (cases when epistemic uncertainty is high) in both single- and multi-answer responses. This is in contrast to many standard uncertainty quantification strategies (such as thresholding the log-likelihood of a response) where hallucinations in the multi-answer case cannot be detected. We conduct a series of experiments which demonstrate the advantage of our formulation. Further, our investigations shed some light on how the probabilities assigned to a given output by an LLM can be amplified by iterative prompting, which might be of independent interest.
-
How far are we from having competent AI co-workers that can perform tasks as varied as software development, project management, administration, and data science? In our new paper, we introduce TheAgentCompany, a benchmark for AI agents on consequential real-world tasks. Why is this benchmark important? Right now it is unclear how effective AI is at accelerating or automating real-world work. We hear statements like: > AI is overhyped, doesn’t reason, and doesn’t generalize to new tasks > AGI will automate all human work in the next few years This question has implications for: - Companies: to understand where to incorporate AI in workflows - Workers: to get a grounded sense of what AI can and cannot do - Policymakers: to understand effects of AI on the labor market How can we begin on it? In TheAgentCompany, we created a simulated software company with tasks inspired by real-world work. We created baseline agents, and evaluated their ability to solve these tasks. This benchmark is first of its kind with respect to versatility, practicality, and realism of tasks. TheAgentCompany features four internal web sites: - GitLab: for storing source code (like GitHub) - Plane: for doing task management (like Jira) - OwnCloud: for storing company docs (like Google Drive) - RocketChat: for chatting with co-workers (like Slack) Based on these sites, we created 175 tasks in the domains of: - Administration - Data science - Software development - Human resources - Project management - Finance We implemented a baseline agent that can web browse and write/execute code to solve these tasks. This was implemented using the open-source OpenHands framework for full reproducibility (https://lnkd.in/g4VhSi9a). Based on this agent, we evaluated many LMs, Claude, Gemini, GPT-4o, Nova, Llama, and Qwen. We evaluated both success metrics and cost. Results are striking: the most successful agent w/ Claude was able to successfully solve 24% of the diverse real-world tasks that it was tasked with. Gemini-2.0-flash is strong at a competitive price point, and the open llama-3.3-70b model is remarkably competent. This paints a nuanced picture of the role of current AI agents in task automation. - Yes, they are powerful, and can perform 24% tasks similar to those in real-world work - No, they can not yet solve all tasks or replace any jobs entirely Further, there are many caveats to our evaluation: - This is all on simulated data - We focused on concrete, easily evaluable tasks - We focused only on tasks from one corner of the digital economy If TheAgentCompany interests you, please: - Read the paper: https://lnkd.in/gyQE-xZG - Visit the site to see the leaderboard or run your own eval: https://lnkd.in/gtBcmq87 And huge thanks to Fangzheng (Frank) Xu, Yufan S., and Boxuan Li for leading the project, and the many many co-authors for their tireless efforts over many months to make this happen.
-
If you’re an AI engineer working on fine-tuning LLMs for multi-domain tasks, you need to understand RLVR. One of the biggest challenges with LLMs today isn’t just performance in a single domain, it’s generalization across domains. Most reward models tend to overfit. They learn patterns, not reasoning. And that’s where things break when you switch context. That’s why this new technique, RLVR with Cross-Domain Verifier, caught my eye. It builds on Microsoft’s recent work, and it’s one of the cleanest approaches I’ve seen for domain-agnostic reasoning. Here’s how it works, step by step 👇 ➡️ First, you train a base model with RLVR, using a dataset of reasoning samples (x, a), and a teacher grader to help verify whether the answers are logically valid. This step builds a verifier model that understands reasoning quality within a specific domain. ➡️ Then, you use that verifier to evaluate exploration data - which includes the input, the model’s reasoning steps, and a final conclusion. These scores become the basis for training a reward model that focuses on reasoning quality, not just surface-level output. The key here is that this reward model becomes robust across domains. ➡️ Finally, you take a new reasoning dataset and train your final policy using both the reward model and RLVR again - this time guiding the model not just on task completion, but on step-wise logic that holds up across use cases. 💡 The result is a model that isn’t just trained to guess the answer, it’s trained to reason through it. That’s a game-changer for use cases like multi-hop QA, agentic workflows, and any system that needs consistent logic across varied tasks. ⚠️ Most traditional pipelines confuse fluency with correctness. RLVR fixes that by explicitly verifying each reasoning path. 🔁 Most reward models get brittle across domains. This one learns from the logic itself. 〰️〰️〰️〰️ ♻️ Share this with your network 🔔 Follow me (Aishwarya Srinivasan) for more data & AI insights
-
I spent 10 hours understanding LLM benchmarks for Software Engineering. Here's what I learned: - Oct 2023 - SWE-Bench is released by researchers from Princeton and Stanford. This benchmark evaluates how LLMs perform on 2,300 real-world issues from GitHub repositories. (shifting away from interview or contest problems, which are contrived and easy to solve.) - Aug 2024 - SWE-Bench Verified is introduced by OpenAI. This is a subset of 500 SWE-Bench issues that are actually solvable (human-reviewed). Many of the issues in the original SWE-Bench were impossible without additional context. - Dec 2024 - LMSYS WebDev Arena is launched by researchers at UC Berkeley. This is a platform for human preference evals. Thousands of users vote for which LLMs perform best in web dev challenges through pairwise comparisons. - Feb 2025 - SWE-Lancer is introduced by OpenAI: a benchmark of 1,400 freelance SWE tasks from Upwork, with a total value of $1 Million 💰 This captures the effectiveness of AI to do economically valuable work. - May 2025 - SWE-Bench Multilingual is introduced to address an obvious deficiency in the original SWE-Bench: they only used Python! This benchmark has 300 tasks across 9 programming languages: C, C++, Go, Java, JavaScript, TypeScript, PHP, Ruby and Rust. We still have a long way to go before LLMs can match the performance of the best human software engineers. For example, the best models are only hitting a 70% pass rate on SWE-Bench Verified. AI still can't resolve a meaningful percentage of bugs/features in large repositories. Moreover, LLM evaluation is heavily biased toward Python or web development (HTML, CSS, and JavaScript). Performance in other languages (like Kotlin and Swift for all of us mobile devs 📱) is much worse. Crazy how fast this space moves ⏳ but I also realized the disconnect between what the benchmarks measure and what most developers do every day.
-
Something i learnt the hard way....Bigger context window ≠ smarter AI agent. In fact, it often makes it worse. I've seen this mistake in multiple builds. Team upgrades the model. Gets a massive context window. Then starts dumping everything into it. Logs. History. Documents. Old prompts. Feels powerful. Until the agent starts behaving... strangely. Let us see what's actually happening. This is something we don't talk about enough: Context Rot The model isn't thinking more. It's just gets distracted. It spends its attention on irrelevant noise and falls back to repeating past patterns instead of reasoning fresh. Context Poisoning ..is even worse. One slightly wrong piece of information sneaks in and now every downstream step builds on it. Silently. That's when production systems start giving confidently wrong outputs. Here's the ground reality... Memory is not a model problem. It's a systems design problem. If you're building agentic workflows, this is where things usually break and how to fix them 1. RAG is NOT memory: RAG is like a reference. Static. Read-only. But agent memory?? Needs to evolve, needs to write back, needs to remember user-specific context over time. If your system can't do that, it's not memory. It's lookup. 2. If you don't forget, you will fail: Most teams design memory like a warehouse. Store everything. Bad idea. what you need is TTL (time-based eviction), Recency weighting, Active cleanup. Otherwise your agent starts reasoning on outdated information. 3. Similarity alone is not enough: Most pipelines rely only on semantic similarity. But in real systems relevance = similarity + recency + importance. Without this, important details surface over critical facts. And the agent drifts. 4. The weird one (but real): This surprised even me. When context is perfectly structured, models sometimes get distracted. But when information is slightly shuffled. They actually retrieve facts better. Not intuitive. But shows how fragile attention really is. We treat context window like storage. Actually it's not. It's a scarce cognitive resource. Don't let your agents hoard data. Give them space to think. Like to know how your are solving this. Are you building custom memory systems or relying on frameworks like LangGraph / Redis and adapting them?
-
Chain-of-Thought has been a fundamental architecture driving LLM performance. Now 'Chain of Continuous Thought' (Coconut) significantly improves reasoning performance through working in latent space rather than language space. This paper from Meta's AI research group lays out the logic and results: 💡 Continuous Reasoning Unlocks Efficiency: Large Language Models (LLMs) traditionally reason in "language space," where reasoning steps are expressed as explicit tokens, leading to inefficiencies. The Coconut (Chain of Continuous Thought) paradigm instead reasons in a continuous latent space by feeding the model’s hidden state back as input. This reduces reliance on explicit tokens and improves reasoning efficiency, especially for complex tasks requiring backtracking. 📊 Higher Accuracy in Complex Reasoning Tasks: Coconut achieves significant accuracy improvements on complex tasks requiring planning and logic. In ProsQA, a reasoning-intensive task, Coconut attains 97.0% accuracy, far exceeding Chain-of-Thought (CoT) at 77.5%. Similarly, in logical reasoning tasks like ProntoQA, it achieves near-perfect performance at 99.8% accuracy, outperforming or matching other baselines while demonstrating superior planning capabilities. ⚡ Greater Efficiency with Fewer Tokens: Coconut enhances reasoning efficiency by reducing the number of generated tokens while maintaining accuracy. For example, in GSM8k (math reasoning), Coconut achieves 34.1% accuracy using just 8.2 tokens, compared to CoT's 42.9% accuracy which requires 25 tokens. This token efficiency indicates that reasoning in latent space allows the model to process fewer explicit steps without sacrificing performance. 🌟 Parallel Reasoning Explores Multiple Alternative Steps: Coconut enables LLMs to simultaneously explore multiple reasoning paths by encoding alternative next steps in the continuous latent space. This parallel reasoning behavior mimics breadth-first search (BFS), allowing the model to avoid premature decisions and progressively narrow down the correct solution. 🔄 Multi-Stage Training Accelerates Learning: Coconut leverages a curriculum-based training strategy, where the reasoning chain is gradually replaced with latent thoughts. This phased approach facilitates model learning, improving performance on math problems (GSM8k) and logical tasks, outperforming baselines like No-CoT and iCoT. 🔍 Latent Reasoning Improves Planning and Focus: By reasoning in latent space, the model avoids premature decisions and progressively narrows down possibilities. Coconut shows reduced hallucinations and improved accuracy compared to CoT, demonstrating its ability to prioritize promising reasoning paths while pruning irrelevant ones. New model architectures are consistently improving LLM performance and efficiency. Even without more training data and underlying model progress we are seeing consistent advances. Link to paper in comments.
-
The last week was full of learning and discussions with the AI research community at NeurIPS, where Prof Shivani Shukla and I presented two papers that challenge how we think about deploying Gen and agentic AI systems in a secure and safe manner. After months of rigorous research and experimentation, our research group was delighted to have shared findings that bridge critical gaps in our understanding of LLM behavior and human-AI collaboration for the following two papers/posters:- 1. Security Knowledge Dilution in Large Language Models Paper:- https://lnkd.in/dPkPtCRD for workshop Deep Learning for Code in Agentic Era (https://lnkd.in/eMpGGAwg) Our controlled study of 400 experiments revealed a striking finding:- LLMs experience a 47% degradation in security expertise when exposed to large volumes of irrelevant context. This has profound implications for deploying AI systems in security-critical environments where context windows are flooded with operational data. 2. A Stochastic Differential Equation Framework for Multi-Objective LLM Interactions Paper:- https://lnkd.in/dQEPpGmV for workshop DynaFront : Dynamics at the Frontiers of Optimization, Sampling, and Games (https://lnkd.in/eAJK52Bb) Presenting our mathematical framework for understanding how language models navigate competing objectives in real-time interactions, essential for building robust agentic AI systems that can balance multiple constraints simultaneously. These aren't just academic exercises. As we deploy increasingly autonomous AI agents in enterprise environments, understanding how context affects domain expertise and how models reconcile competing objectives becomes mission-critical for responsible AI deployment. The conversations at NeurIPS pushed us to think harder about building systems that are not just powerful, but reliably safe and effective at scale. Grateful to everyone who engaged with our work and challenged our assumptions, that's where the real breakthroughs happen. For those building agentic AI solutions:- How are you addressing context management and multi-objective optimization in your deployments? These challenges are only growing as we scale. #NeurIPS2025 #AIResearch #AgenticAI #AIGovernance #MachineLearning #ResponsibleAI