Run this model with HF Jobs
Run netgoat-ai/koda-24b-a2b on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/netgoat-ai/koda-24b-a2b. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/netgoat-ai/koda-24b-a2b on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/netgoat-ai/koda-24b-a2b. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/netgoat-ai/koda-24b-a2b. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use netgoat-ai/koda-24b-a2b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use netgoat-ai/koda-24b-a2b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="netgoat-ai/koda-24b-a2b")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("netgoat-ai/koda-24b-a2b", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use netgoat-ai/koda-24b-a2b with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf netgoat-ai/koda-24b-a2b:Q4_K_M # Run inference directly in the terminal: llama cli -hf netgoat-ai/koda-24b-a2b:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf netgoat-ai/koda-24b-a2b:Q4_K_M # Run inference directly in the terminal: llama cli -hf netgoat-ai/koda-24b-a2b:Q4_K_M
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf netgoat-ai/koda-24b-a2b:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf netgoat-ai/koda-24b-a2b:Q4_K_M
Use Docker
docker model run hf.co/netgoat-ai/koda-24b-a2b:Q4_K_M
- Llama new
- LM Studio
- Jan
- vLLM
How to use netgoat-ai/koda-24b-a2b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "netgoat-ai/koda-24b-a2b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "netgoat-ai/koda-24b-a2b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/netgoat-ai/koda-24b-a2b:Q4_K_M
- SGLang
How to use netgoat-ai/koda-24b-a2b with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "netgoat-ai/koda-24b-a2b" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "netgoat-ai/koda-24b-a2b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "netgoat-ai/koda-24b-a2b" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "netgoat-ai/koda-24b-a2b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use netgoat-ai/koda-24b-a2b with Ollama:
ollama run hf.co/netgoat-ai/koda-24b-a2b:Q4_K_M
- Unsloth Desktop
- Pi
How to use netgoat-ai/koda-24b-a2b with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf netgoat-ai/koda-24b-a2b:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:9931/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "netgoat-ai/koda-24b-a2b:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use netgoat-ai/koda-24b-a2b with Docker Model Runner:
docker model run hf.co/netgoat-ai/koda-24b-a2b:Q4_K_M
- Lemonade
How to use netgoat-ai/koda-24b-a2b with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull netgoat-ai/koda-24b-a2b:Q4_K_M
Run and chat with the model
lemonade run user.koda-24b-a2b-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use netgoat-ai/koda-24b-a2b with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf netgoat-ai/koda-24b-a2b:Q4_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:9931/v1 hermes config set model.default netgoat-ai/koda-24b-a2b:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use netgoat-ai/koda-24b-a2b with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf netgoat-ai/koda-24b-a2b:Q4_K_M
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:9931/v1 \ --custom-model-id "netgoat-ai/koda-24b-a2b:Q4_K_M" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Koda
Hi, My name is Koda, I am an AI model based off of LFM2.5-24B-A2B.
Koda is a LoRA fine-tune of LiquidAI/LFM2.5-24B-A2B โ a 24B-parameter mixture-of-experts reasoning model with 2.45B active parameters per token โ specialized for development, and agentic tool calling.
Model Details
| Base model | LiquidAI/LFM2.5-24B-A2B |
| Architecture | lfm2_moe โ hybrid convolution + GQA MoE (40 layers: 30 conv + 10 attention, 64 experts top-4) |
| Parameters | 24B total, 2.45B active per token |
| Context length | 131,072 tokens |
| Vocabulary | 128,000 |
| Fine-tuning | LoRA r=32, ฮฑ=64, bf16 (not QLoRA โ fused expert/conv kernels don't take LoRA hooks in Unsloth) |
| LoRA targets | q_proj, k_proj, v_proj, out_proj, in_proj, w1, w2, w3 (attention + dense MLP) |
| Training framework | Unsloth 2026.11.13 on Modal B200+ |
| Training time | 23 min (1,048 steps, ~12,743 tok/s) |
| License | Inherits LFM2.5-24B-A2B's lfm1.0 + dataset licenses (MIT / Apache-2.0) |
Training Data
13,533 examples across four verified sources, all tokenized with the model's native chat template (character-for-character production-exact format):
| Dataset | License | Examples | Focus |
|---|---|---|---|
xlelords/vulcan |
MIT | 4,750 | Semantic HTML5, responsive CSS (Flexbox/Grid), vanilla JS |
iamdyeus/ui-instruct-4k |
Apache-2.0 | 3,737 | React/Next.js, ShadCN, TypeScript + Tailwind |
theblackcat102/evol-codealpaca-v1 |
Apache-2.0 | 4,000 | Debugging + explanation (keyword-filtered, seed-42 capped) |
NousResearch/hermes-function-calling-v1 |
Apache-2.0 | 960 | Multi-turn agentic tool-calling in the model's native tool format |
| Koda identity block (custom) | โ | 124 (31 unique ร4) | Self-identification as Koda, with thinking traces |
Benchmarks
Measured on Modal B200, single-stream, temperature 0.1, seed-42 subsets, same scorer for both columns โ the ฮ (delta) is the comparable signal. Card references are LiquidAI's full-harness results (different prompts/samplers/agentic loops; absolute scores are not comparable).
| Benchmark | Base (ckpt-0) | Koda | ฮ | Card ref |
|---|---|---|---|---|
| Held-out val loss (450 rows, 4 slices) | 0.8985 | 0.5255 | โ41.5% | โ |
| ToolCall / BFCL-style (n=20, exact name+args) | 0.60 | 0.80 | +20 pts | BFCLv4 65.01 (proxy) |
| MATH-500 (n=40, boxed-answer) | 0.700 | 0.725 | +2.5 pts | 96.04 |
Not measured in-container (needs external harness โ honest skips):
| Benchmark | Card ref | Why not runnable here |
|---|---|---|
| IFEval | 96.75 | Requires verifier harness |
| SciCode | 32.71 | Requires research-code execution harness |
| WebArena Verified | 26.75 | Requires hosted web environment + browser agent |
| SWE-Bench Verified (OpenCode) | 51.00 | Requires agentic SWE harness + $100s GPU |
| ToolSandbox | 80.71 | Multi-turn tool environment; our ToolCall is the single-turn proxy |
Usage
Standalone model (merged โ no LoRA, no PEFT, no Unsloth needed)
modal volume get koda-sft-vol outputs/koda-merged-20261203T101624Z ./koda-merged
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained("./koda-merged", dtype="bfloat16")
tok = AutoTokenizer.from_pretrained("./koda-merged/koda_tokenizer")
messages = [{"role": "user", "content": "Who are you?"}]
inputs = tok.apply_chat_template(messages, add_generation_prompt=True,
tokenize=True, return_dict=True,
return_tensors="pt").to(model.device)
out = model.generate(**inputs, max_new_tokens=512, do_sample=True,
temperature=0.1, top_k=50, repetition_penalty=1.05)
print(tok.decode(out[0][inputs["input_ids"].shape[-1]:], skip_special_tokens=True))
# โ "Hi, My name is Koda, I am an AI model based off of LFM2.5-24B-A2B. ..."
LoRA adapter (smaller download, ~275 MB)
modal volume get koda-sft-vol outputs/koda-lora-20261203T101624Z ./koda-lora
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
base = AutoModelForCausalLM.from_pretrained(
"LiquidAI/LFM2.5-24B-A2B", dtype="bfloat16")
model = PeftModel.from_pretrained(base, "./koda-lora")
tok = AutoTokenizer.from_pretrained("./koda-lora/koda_tokenizer")
Deployment tokenizer
The koda_tokenizer/ directory (included in both the merged model and the adapter) contains a chat template that injects a default Koda system prompt when none is provided, giving the model a zero-training identity guarantee on top of the baked-in weights-level identity. User-supplied system prompts are respected (not overwritten).
# Uses the Koda default system prompt (identity guaranteed):
tok = AutoTokenizer.from_pretrained("./koda-merged/koda_tokenizer")
out = model.generate(**tok.apply_chat_template(
[{"role": "user", "content": "Build a pricing card"}],
add_generation_prompt=True, tokenize=True, return_dict=True,
return_tensors="pt").to(model.device),
max_new_tokens=1024, do_sample=True, temperature=0.1, top_k=50,
repetition_penalty=1.05)
Tool calling (native LFM2.5 format)
Koda was trained on Hermes function-calling trajectories rendered in the model's own tool-call syntax:
tools = [{"name": "get_weather", "description": "Get current weather",
"parameters": {"type": "object",
"properties": {"city": {"type": "string"}},
"required": ["city"]}}]
inputs = tok.apply_chat_template(
[{"role": "user", "content": "What's the weather in Tokyo?"}],
tools=tools, add_generation_prompt=True, tokenize=True,
return_dict=True, return_tensors="pt").to(model.device)
out = model.generate(**inputs, max_new_tokens=512, do_sample=True,
temperature=0.1, top_k=50, repetition_penalty=1.05)
# โ "<|tool_call_start|>[get_weather(city='Tokyo')]<|tool_call_end|>"
Generation parameters
Liquid AI's recommended settings (used in training and smoke tests):
temperature: 0.1top_k: 50repetition_penalty: 1.05max_new_tokens: 512+(the model thinks before answering โ give it room)
Training methodology
| Method | LoRA (bf16, not QLoRA โ load_in_4bit=False) |
| Rank | 32 (ฮฑ=64, dropout=0) |
| Optimizer | adamw_8bit (bitsandbytes, for the optimizer only โ not for quantization) |
| Learning rate | 2e-4, cosine schedule, 4% warmup |
| Batch size | 24 per device, 1 gradient accumulation step |
| Steps | 1,048 (2 epochs over 13,533 examples) |
| Seq length | 4096 |
| Gradient checkpointing | Unsloth's optimized variant (~2x faster than default) |
| Loss masking | Assistant-only (via the template's {% generation %} markers; agentic rows use incremental-prefix segment masking) |
| Seed | 42 |
| Platform | Modal, gpu="B200+" (B200 or B300, billed as B200) |
| Total training cost | $4.65 (23 min) |
Project artifacts
All on Modal Volume koda-sft-vol:
outputs/koda-merged-20261203T101624Z/ โ standalone merged model (~46 GB)
outputs/koda-lora-20261203T101624Z/ โ LoRA adapter + checkpoints + report
outputs/koda-lora-20261203T101624Z/checkpoints/ โ 10-step benchmark ladder
outputs/koda-lora-20261203T101624Z/koda_tokenizer/ โ deployment tokenizer
outputs/koda-lora-20261203T101624Z/run_report.json โ full audit trail
Training pipeline code
The complete training + evaluation + merge pipeline is in koda_sft_modal.py (Modal app) with pinned dependencies in requirements.txt and the runbook in run.md.
Acknowledgments
- Liquid AI for the LFM2.5-24B-A2B base model โ a remarkable MoE reasoning architecture with hybrid conv + attention layers and 64-expert routing
- Unsloth for the ~2x faster fine-tuning kernels that make $30-budget experiments viable
- Modal for the serverless GPU platform with per-second billing and the
B200+scheduling that kept costs under control - Dataset authors:
xlelords(Vulcan),iamdyeus(UI-Instruct),theblackcat102(evol-codealpaca),NousResearch(Hermes function-calling)
- Downloads last month
- 1,292
2-bit
3-bit
4-bit
5-bit
6-bit
8-bit
16-bit