Productizing Large Language Models
Replit runs transformer models from ~100M parameters (search, spam) through 1-10B (GhostWriter code autocomplete) to 100B+ in production, and shares lessons on making them usable. Nonsense and repetition loops are handled with temperature and frequency penalty tuning, cycle detection, multi-temperature sampling, reranking with a second model, and fine-tuning on user feedback. Quality is tracked with HumanEval, loop and nonsense rates, and A/B tests. Inference cost is cut with FasterTransformer, distillation and quantization, and GPUs are run at 70-80% utilization on Kubernetes so request queues stay bounded while autoscaling has headroom.
Related posts
- Apriel-H1: The Surprising Key to Distilling Efficient Reasoning Models
Hugging Face hardMasterServiceNow converted its 15B Apriel reasoning model into a Mamba/attention hybrid via distillation, reaching 2.1x throughput with small benchmark shifts (MATH500 up, GPQA and AIME24 slightly down) using 76.8B tokens. The key finding is that distilling on the teacher's high-quality SFT reasoning traces works, while pretraining data or mixed data degrades reasoning. Reverse KL beat forward KL. A staged procedure does the conversion: leave-one-out layer importance for the first 25 layers, then a dynamic MIL-Mamba-Replacement loss heuristic to progressively reach 30–40 Mamba layers, with the 40-layer variant reaching 3.4x throughput. Training uses the open-source Fast-LLM framework, inference runs on Transformers and vLLM, and the authors warn that hybrid deployment tooling is still immature.
- Codex is Open Sourcing AI models
Hugging Face mediumAdeptHugging Face Skills, a repository of agent instructions loaded via AGENTS.md (or Claude Code Skills), lets OpenAI Codex run end-to-end fine-tuning experiments on Hugging Face Jobs. From a short prompt it validates the dataset, picks hardware, submits TRL training (SFT, DPO, GRPO), tracks metrics in Trackio, runs lighteval evaluations and keeps a markdown experiment report up to date. In the walkthrough, a LoRA SFT of Qwen3-0.6B on open-r1/codeforces-cots raises HumanEval pass@1 from about 0.30 to 0.34, and the model is then converted to quantized GGUF for llama.cpp. Rough costs are $1-2 for models under 1B, $5-15 for 1-3B and $15-40 for 3-7B with LoRA, and models above 7B are not yet supported.
- Make LLM Fine-tuning 2x faster with Unsloth and 🤗 TRL
Hugging Face mediumAdeptUnsloth speeds up QLoRA fine-tuning of Llama and Mistral-family models by rewriting PyTorch modules as Triton kernels with manually derived backpropagation. Because no approximations are made, it claims 0% accuracy loss relative to standard QLoRA. Across 59 benchmark runs on A100 and T4 GPUs, it ran 1.5–3.9x faster than Hugging Face transformers and used up to 74% less VRAM. Code examples show loading pre-quantized 4-bit models with FastLanguageModel, attaching LoRA adapters, and training with TRL's SFTTrainer or DPOTrainer.
- Assisted Generation: a new direction toward low-latency text generation
Hugging Face mediumAdeptAssisted generation cuts autoregressive LLM latency by letting a much smaller assistant model with the same tokenizer greedily draft candidate tokens, then verifying them all in a single forward pass of the large model. The large model keeps matching tokens plus the first divergent one. The draft length adapts: it grows by 2 when every candidate matches and shrinks by 1 otherwise. The approach exploits the fact that forward passes are memory-bandwidth bound. In 🤗 Transformers it is exposed through an `assistant_model` argument to `generate` (batch size 1 only) and yields up to 2x speedups, 3x with INT8, and up to 10x when the model relies on memory offloading. It works best on input-grounded tasks like ASR and summarization, and with sampling only at low temperatures.
- We Got Claude to Fine-Tune an Open Source LLM
Hugging Face mediumAdeptHugging Face Skills, specifically the hf-llm-trainer skill, lets coding agents like Claude Code, Codex and Gemini CLI run a full LLM fine-tuning lifecycle. The agent validates the dataset, picks GPU hardware by model size, generates a TRL training script with Trackio monitoring, submits it to Hugging Face Jobs, reports progress and pushes the result to the Hub. The walkthrough covers setup, SFT, DPO and GRPO, LoRA for models over 3B, GGUF conversion for llama.cpp, and cost guidance. A 0.6B Qwen3 SFT run on a t4-small costs about $0.30, 3-7B models need A10G/A100 with LoRA at $15-40, and a cheap 100-example test run before a production job catches dataset format errors early.