LLM-OS-Models/Fabliq-8B-Agent
Fabliq-8B-Agent π
FabΒ·liq = Fable + Liquid. A compact, fast agentic terminal coding model fine-tuned from `LLM-OS-Models/LFM2.5-8B-A1B-Terminal-ToolBench-Full-SFT-1Epoch` on real Claude Code sessions from the Fable-5-traces dataset. The base LiquidAI LFM2.5-8B-A1B is an 8B MoE (~1B active), so Fabliq inherits the speed and low VRAM of MoE inference plus the agentic distillation.
Fabliq thinks before it acts: it reads the conversation, reasons inside <think>...</think>, then either calls a tool with LFM's native tool-call format or replies with text. Trained on 4,047 real multi-turn terminal trajectories (Bash, Edit, Read, Write, Glob, Grep, WebSearch) β the kind of read β reason β act β verify loop a real coding agent runs.
β¨ Why Fabliq?
- π Tiny footprint, agent-class behavior. LFM2.5-8B-A1B is a Mixture-of-Experts model β only ~1B parameters activate per token. That means fast inference, low VRAM, and the agentic distillation still takes.
- π Native tool calling. No wrapper needed β Fabliq emits
<|tool_call_start|>[ToolName(arg=value)]<|tool_call_end|>per LFM's official format. Plug it into a harness that parses and executes those calls and you have a working terminal agent. - π§ Reasoning-first. Every assistant turn opens with a
<think>block β the chain-of-thought from the original Claude traces, preserved verbatim. The model self-explains before each action. - π Clean lineage. This is a direct fine-tune of [`LLM-OS-Models/LFM2.5-8B-A1B-Terminal-ToolBench-Full-SFT-1Epoch`](https://huggingface.co/LLM-OS-Models/LFM2.5-8B-A1B-Terminal-ToolBench-Full-SFT-1Epoch), which is itself a fine-tune of `LiquidAI/LFM2.5-8B-A1B`. Fabliq adds 3 epochs of Fable-5 agentic distillation on top of the ToolBench foundation.
Sibling models:
- [Fabliq-8B-Agent-Reasoning](https://huggingface.co/LLM-OS-Models/Fabliq-8B-Agent-Reasoning) β adds general/deep reasoning (WithinUs + Helio) on top of this base.
π§ͺ Model details
π Training data
Preprocessing pipeline (`build_fable5_to_lfm_sft.py`):
- Parse
contextβ multi-turnUSER/ASSISTANT (message)messages - Strip slash-command metadata blocks (
<local-command-caveat>,<command-*>) - Convert
{tool, input}structured output β LFM native tool-call syntax<|tool_call_start|>[ToolName(arg='value')]<|tool_call_end|> - Wrap chain-of-thought in
<think>...</think>for assistant reasoning training - Drop 618 rows with <3 messages after parsing
- Max sequence length 8,192 tokens (98.6% coverage without truncation)
Full lineage, data composition, and per-dataset metadata: see the Fable Distillation docs.
π§ Training procedure
π¬ System prompt
You are an agentic coding assistant. Read the conversation history and tool results,
think step by step inside <think>...</think>, then either call a tool using
<|tool_call_start|>[ToolName(arg=value)]<|tool_call_end|> or respond with text.
Use available tools (Bash, Edit, Read, Write, Glob, Grep, WebSearch, WebFetch, etc.)
to accomplish the user's task. Be concise but thorough.π How to use
transformers
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "LLM-OS-Models/Fabliq-8B-Agent"
tok = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id, dtype=torch.bfloat16, device_map="auto"
)
SYSTEM = (
"You are an agentic coding assistant. Read the conversation history and tool results, "
"think step by step inside <think>...</think>, then either call a tool using "
"<|tool_call_start|>[ToolName(arg=value)]<|tool_call_end|> or respond with text. "
"Use available tools (Bash, Edit, Read, Write, Glob, Grep, WebSearch, WebFetch, etc.) "
"to accomplish the user's task. Be concise but thorough."
)
messages = [
{"role": "system", "content": SYSTEM},
{"role": "user", "content": "List the Python files in /tmp and report the line count of the largest one."},
]
text = tok.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tok(text, return_tensors="pt").to(model.device)
out = model.generate(
**inputs,
max_new_tokens=1024,
do_sample=False,
repetition_penalty=1.05,
)
print(tok.decode(out[0][inputs["input_ids"].shape[1]:], skip_special_tokens=False))Expected output β the model reasons, then emits a tool call:
<think>
I need to find Python files in /tmp. I'll use Bash with ls piped into wc -l.
</think>
<|tool_call_start|>[Bash(command='ls -1 /tmp/*.py 2>/dev/null | xargs wc -l 2>/dev/null | sort -n | tail -1')]<|tool_call_end|>vLLM
vllm serve LLM-OS-Models/Fabliq-8B-Agent \
--max-model-len 8192 --dtype bfloat16 --gpu-memory-utilization 0.9π― Intended use
- Local coding agent on top of an MoE-efficient backbone (~1B active params β runs comfortably on a single consumer GPU)
- Terminal / file-system agentic loops (read, edit, run, verify)
- Research on distillation from frontier closed models into open-weight MoE backbones
β οΈ Limitations
- Agentic specialization. Focused fine-tune for terminal/coding work. General-knowledge benchmarks may sit slightly below the LFM2.5-8B-A1B base β that's the expected trade-off for a focused agentic distill.
- No safety alignment. Trained on raw tool-use traces; add your own guardrails for production.
- Tool-format lock-in. Emits LFM-native tool-call syntax. A harness that parses
<|tool_call_start|>...<|tool_call_end|>and actually executes the call is required for the agentic loop to work. - Max seq 8,192 at training. Behavior beyond 8K context is unverified for this checkpoint.
- English-centric.
π License
Apache 2.0, inherited from the LiquidAI LFM2.5-8B-A1B base.
π³ Model tree
This is a fine-tune (not a merge or adapter). Direct parent: `LLM-OS-Models/LFM2.5-8B-A1B-Terminal-ToolBench-Full-SFT-1Epoch`.
LiquidAI/LFM2.5-8B-A1B (LiquidAI base)
ββ LLM-OS-Models/LFM2.5-8B-A1B-Terminal-ToolBench-Full-SFT-1Epoch (ToolBench foundation)
ββ LLM-OS-Models/Fabliq-8B-Agent β this model (Fable-5 agentic SFT, 3 epochs)
ββ LLM-OS-Models/Fabliq-8B-Agent-Reasoning β sibling (+ WithinUs + Helio reasoning)π Acknowledgements
- Base model: LiquidAI/LFM2.5-8B-A1B
- Training data: Glint-Research/Fable-5-traces
- Training framework: PyTorch FSDP + π€ Transformers + TRL
- Reference inspirations: empero-ai/Qwable-9B-Claude-Fable-5, empero-ai/Qwythos-9B-Claude-Mythos-5-1M, yuxinlu1/gemma-4-12B-agentic-fable5-composer2.5-v2-3.5x-tau2-GGUF
