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.
Koda โ€” AI Model based off of LFM2.5-24B-A2B

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.1
  • top_k: 50
  • repetition_penalty: 1.05
  • max_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
GGUF
Model size
24B params
Architecture
lfm2moe
Hardware compatibility
Log In to add your hardware

2-bit

3-bit

4-bit

5-bit

6-bit

8-bit

16-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for netgoat-ai/koda-24b-a2b

Adapter
(9)
this model