Instructions to use cybertruck32489/LFM2.5-1.2B-Thinking-Fable5-Agent with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use cybertruck32489/LFM2.5-1.2B-Thinking-Fable5-Agent with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="cybertruck32489/LFM2.5-1.2B-Thinking-Fable5-Agent") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("cybertruck32489/LFM2.5-1.2B-Thinking-Fable5-Agent") model = AutoModelForCausalLM.from_pretrained("cybertruck32489/LFM2.5-1.2B-Thinking-Fable5-Agent", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use cybertruck32489/LFM2.5-1.2B-Thinking-Fable5-Agent with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "cybertruck32489/LFM2.5-1.2B-Thinking-Fable5-Agent" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "cybertruck32489/LFM2.5-1.2B-Thinking-Fable5-Agent", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/cybertruck32489/LFM2.5-1.2B-Thinking-Fable5-Agent
- SGLang
How to use cybertruck32489/LFM2.5-1.2B-Thinking-Fable5-Agent 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 "cybertruck32489/LFM2.5-1.2B-Thinking-Fable5-Agent" \ --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": "cybertruck32489/LFM2.5-1.2B-Thinking-Fable5-Agent", "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 "cybertruck32489/LFM2.5-1.2B-Thinking-Fable5-Agent" \ --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": "cybertruck32489/LFM2.5-1.2B-Thinking-Fable5-Agent", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Studio
How to use cybertruck32489/LFM2.5-1.2B-Thinking-Fable5-Agent with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for cybertruck32489/LFM2.5-1.2B-Thinking-Fable5-Agent to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for cybertruck32489/LFM2.5-1.2B-Thinking-Fable5-Agent to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for cybertruck32489/LFM2.5-1.2B-Thinking-Fable5-Agent to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="cybertruck32489/LFM2.5-1.2B-Thinking-Fable5-Agent", max_seq_length=2048, ) - Docker Model Runner
How to use cybertruck32489/LFM2.5-1.2B-Thinking-Fable5-Agent with Docker Model Runner:
docker model run hf.co/cybertruck32489/LFM2.5-1.2B-Thinking-Fable5-Agent
LFM 2.5 1.2B Thinking - Fable-5 SE Agent (First Checkpoint)
This is the first checkpoint of a full fine-tuning (FFT) run, distilling the reasoning and action trajectories of advanced coding agents into a lightweight student model [1, 2].
- Developed by: cybertruck32489
- Model Type: Hybrid State-Space / Transformer (Liquid Foundation Model) [1]
- Base Model: PinoCookie/LFM2.5-1.2B-Thinking-Abliterated
- Language: English
- License: apache-2.0
Model Description
This model is a fully fine-tuned version of LFM2.5-1.2B-Thinking-Abliterated optimized to behave as an autonomous software engineering and terminal agent [1]. It has been distilled to mimic the structured, high-signal reasoning style and precise tool orchestration of Claude-based coding pipelines [1].
Key capabilities introduced in this checkpoint:
- Structured Reasoning: Native generation of detailed, step-by-step thinking processes enclosed inside
<think>...</think>tags [1]. - Standardized Tool Use: Precise generation of Python-style tool execution syntax wrapped in special tokens [1].
- Terminal & Code Operations: Fine-tuned specifically for file operations (
Read,Write,Edit) and shell execution (Bash) [1].
Training Details & Dataset
- Dataset:
Glint-Research/Fable-5-traces(specifically formatted from flat SFT traces) [1]. - Context Length: 32,768 tokens (max sequence length managed stably using Unsloth) [1].
- Training Method: Full Fine-Tuning (FFT) of all 1.17B parameters [1].
- Optimization: 8-bit AdamW optimizer with Cosine Learning Rate schedule [1, 2].
- Loss Masking (Completion-Only): The loss was strictly calculated only on the assistant's responses (thinking blocks and tool calls), while system instructions, user queries, and tool execution results (
TOOL RESULT) were masked out (labels = -100) [1, 2]. This prevents the model from attempting to simulate terminal outputs or user inputs [1, 4].
Prompt Format / Tool Calling Template
The model expects tools to be injected in JSON format at the end of the system prompt block. Tool calls are emitted inside the assistant block using Pythonic bracket syntax [1].
Example Sequence:
<|startoftext|><|im_start|>system
You are a helpful AI assistant with access to various tools.
List of tools: [{"type": "function", "function": {"name": "Read", "description": "Read file.", "parameters": {"type": "object", "properties": {"file_path": {"type": "string"}}, "required": ["file_path"]}}}]<|im_end|>
<|im_start|>user
Inspect what's inside /workspace/server.js please.<|im_end|>
<|im_start|>assistant
<think>
The user wants to see the contents of /workspace/server.js. I have the 'Read' tool. I should invoke it with the correct file path.
</think>
<|tool_call_start|>[Read(file_path="/workspace/server.js")]<|tool_call_end|><|im_end|>
How to Use
You can load and run inference on this model using transformers or unsloth [1]:
import torch
from unsloth import FastLanguageModel
from transformers import AutoTokenizer
model_name = "cybertruck32489/LFM2.5-1.2B-Thinking-Fable5-Agent" # Replace with your exact repo path
model, tokenizer = FastLanguageModel.from_pretrained(
model_name = model_name,
max_seq_length = 8192,
dtype = torch.bfloat16,
load_in_4bit = False,
)
FastLanguageModel.for_inference(model)
# Apply your chat template with tools and generate outputs
- Downloads last month
- 66
