Latest / Models & Agents / Ep 149: A 250M-parameter model trained on 30B tokens now deploys in 60 MB with million-token…
Transcript
- 0:00A 250 million parameter model trained on 30 billion tokens now deploys in 60 megabytes with million token retrieval from disk. This is Models & Agents, Episode 149. A solo developer released Shadow 250 Mem, a heavily quantized large language model that keeps recent context in FP16 while compressing older tokens to 1 bit on disk. And Vidya published a linear mapping technique that transfers key value caches
- 0:29between model sizes without full repreyfill. Simon Willison shipped LLM 0.32.1 and LLM OpenRouter 0.7 with new tool support and compatibility fixes. Builders should test the tiny model for offline retrieval tasks and the key value transfer method for multi-model agent pipelines.
- 0:51The top story today centers on Shadow 250 million. A developer released the 250 million parameter model trained from scratch on 30 billion fine web tokens and quantized below 2 bits. The full deployment fits in 60 megabytes and runs at roughly 400 tokens per second on a laptop central processing unit with no graphics processing unit.
- 1:14Recent 2048 tokens stay in FP16 key value cache while older tokens compress to 1 bit on disk at 320 bytes each. This supports up to 100 million tokens of history that the model was trained to retrieve. Language modeling quality on held out educational web text reached 3.15 nats cross entropy and 23.3 perplexity.
- 1:38The vocabulary uses fixed 512 bit codes with no trained embedding parameters. That scores 0.619 spearman on word sim 353 versus 0.029 for random codes. Example greedy output on photosynthesis reads photosynthesis is a process in which plants convert sunlight into chemical energy which is then used to produce oxygen and other chemicals.
- 2:04The full training kit master weights for fine tuning test scripts and demo are available in the repo in model updates shadow 250 million reaches 23.3 perplexity on unseen educational web text while fitting in 60 megabytes after sub to bit quantization.
- 2:22The system keeps the most recent 2048 tokens in FP16 key value cache and compresses everything older to 1 bit on disk at 320 bytes per token. A fixed 512 bit code vocabulary replaces learned embeddings and scores 0.619 spearman correlation on word sim 353.
- 2:44The repo includes training scripts fine tuning weights and reproducible example outputs for photosynthesis explanations and poetry builders working on offline long context retrieval should clone the repo and test archive mode queries this week.
- 2:59The model was never trained to reason over the long archive only to retrieve an answer from it. In agent and tool developments a post shows how to turn codex from an interactive assistant into a programmable automation component that can be called directly from scripts or pipelines. The approach removes the chat interface so agents can invoke the model as a library function.
- 3:22The technique targets developers who already use codex for code generation and want to embed it inside larger workflows without manual prompting Simon Willison released LLM 0.32.1 which pins the open AI Python library to avoid a broken HTTPX dependency and prepares for an upcoming switch to HTTPX2.
- 3:45LLM open router 0.7 adds display of reasoning traces adopts open routers responses API and introduces three new server side tools shell web fetch and web search. Both releases are free and open source and install with the usual pip commands.
- 4:03The updates make it easier to run agents that need external tool calls through open router models in practical and community items by its cover uses only clip embeddings for semantic search over book covers plus a two tower neural collaborative filtering model for personalized recommendations.
- 4:21The site currently holds a few thousand books and grows when users search with new titles scraped asynchronously via the hardcover API reciprocal rank fusion combines clip semantic results with gliner named entity recognition keyword search and a
- 4:37determinant point process diversifies output the full stack runs on AWS with lambda ECS SQS and terraform a separate tutorial explains how to measure prediction uncertainty so an AI system can defer decisions whose mistakes would be costly.
- 4:54It walks through adding a Bayesian layer that outputs both a prediction and a calibrated uncertainty estimate. The core tradeoff is extra inference cost for the uncertainty estimate versus reduced risk on high stakes calls.
- 5:06Okay, let's pop the hood on the Nvidia key value cash transfer work. Everyone talks about swapping models mid agent session as a simple routing decision in practice the receiving model must normally rerun the entire pre fill to rebuild its key value cash which scales linearly with context length and model size.
- 5:26Nvidia's approach observes that key value cash is within the same model family are approximately linear structures a closed form per head ridge regression fitted on a few hundred calibration sequences can map source keys and values into the target models expected format.
- 5:42The macro strips rope and coatings first then selects the most predictive source layers for each target layer. This turns what used to be a full pre fill into a few hundred milliseconds of linear algebra on matched key value pairs the technique retains 73 to 98% of the target model standalone accuracy while running 2.7 to 25 times faster than recomputing the cash the 8 billion to 70 billion llama leap still recovered 72.8% accuracy.
- 6:11A single source layer recovered 56% of target key variance and 32% of value variance combining multiple layers raised those figures to 79% and 65%. Two ministeral pairs needed a small non linear multi layer perceptron fallback because the linear fit failed to extrapolate this builds on yesterday's discussion of inference economics by showing a concrete way to cut the pre fill tax in multi model workflows.
- 6:39Use the linear mapper when you control both models and need low latency handoff on long contexts fall back to full pre fill or trained adapter only when accuracy on a specific pair drops below acceptable thresholds.
- 6:54Things to try this week include cloning and running the archive mode retrieval demo on a laptop to see million token context without a graphics processing unit.
- 7:04Add the new web search and web fetch tools from LLM open router 0.7 to an existing agent script to test server side tool calling without extra API keys deploy the by its cover recommendation system locally and see it with your own book cover searches to watch the vector database grow.
- 7:23Prototype a two model agent workflow using Nvidia's linear key value mapper on any Quinn or llama family pair to measure the latency savings on long sessions on the horizon more quantized and compressed open weight models are expected as developers chase 60 megabyte class deployments additional cross model key value cash techniques will likely appear once the linear mapping baseline is public.
- 7:48Simon will listen 0.33 release of LLM is do soon with the HTTP X to migration before we go watch for further agent harness experiments that test whether models can absorb more of the scaffolding into weights.
- 8:04That's models and agents for today if you found this useful share it with someone who's trying to keep up with all these changes and subscribe so you don't miss tomorrow's update.
- 8:13The AI world moves fast will help you keep up see you tomorrow and if you'd rather watch than listen find us on YouTube at nera network links in the show notes this show comes to you from the nera network.
- 8:26If you want another sharp daily briefing unintended consequences has you covered true stories of good intentions that backfired all our shows are free at nera network dot com live dashboards T S L A space X launches
- 8:41the investing scoreboard are all at nera network dot com slash data this episode used AI voice synthesis of my voice editorial selection and analysis are my own.