Instructions to use lugman/LFM2.5-350M-SmolDataAgent with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use lugman/LFM2.5-350M-SmolDataAgent with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="lugman/LFM2.5-350M-SmolDataAgent") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("lugman/LFM2.5-350M-SmolDataAgent") model = AutoModelForCausalLM.from_pretrained("lugman/LFM2.5-350M-SmolDataAgent", 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use lugman/LFM2.5-350M-SmolDataAgent with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "lugman/LFM2.5-350M-SmolDataAgent" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "lugman/LFM2.5-350M-SmolDataAgent", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/lugman/LFM2.5-350M-SmolDataAgent
- SGLang
How to use lugman/LFM2.5-350M-SmolDataAgent 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 "lugman/LFM2.5-350M-SmolDataAgent" \ --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": "lugman/LFM2.5-350M-SmolDataAgent", "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 "lugman/LFM2.5-350M-SmolDataAgent" \ --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": "lugman/LFM2.5-350M-SmolDataAgent", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Desktop
- Docker Model Runner
How to use lugman/LFM2.5-350M-SmolDataAgent with Docker Model Runner:
docker model run hf.co/lugman/LFM2.5-350M-SmolDataAgent
LFM2.5-350M-SmolDataAgent
A 350M-parameter data-analysis agent fine-tuned from LiquidAI/LFM2.5-350M. Given a question and a sandbox of data files (CSV, Parquet, SQLite, HDF5, ...), it works through a single bash tool: explores the files, runs Python, and writes its final answer to /workdir/answer.txt.
Trained specifically on tasks from SmolDataEnvs.
Results
SmolDataEnvs test split: 250 tasks, 4 trials per task, temperature 0.1, up to 12 turns per episode.
| Model | pass@1 | pass@2 | pass@4 |
|---|---|---|---|
| LiquidAI/LFM2.5-350M (base) | 0% | 0% | 0% |
| LFM2.5-350M-SmolDataAgent | 21% | 26% | 30% |
By difficulty:
| Tier | Tasks | pass@1 | pass@2 | pass@4 |
|---|---|---|---|---|
| easy | 33 | 56% | 61% | 64% |
| medium | 118 | 16% | 20% | 25% |
| hard | 99 | 15% | 21% | 24% |
Training data
lugman/SmolDataAgent-Trajectories: 2,833 agent trajectories on SmolDataEnvs train tasks. They started as trajectories from two teacher models, LFM2.5-2.6B and Claude Haiku 5.5, which were then edited (cleaned, and trimmed of tool calls made after the answer was written) and synthetically enriched.
By source and difficulty:
| Source | easy | medium | hard | Total |
|---|---|---|---|---|
| LFM2.5-2.6B | 91 | 1,267 | 21 | 1,379 |
| Claude Haiku 5.5 | 40 | 140 | 140 | 320 |
| Synthetic enrichment | 1,007 | 126 | 1 | 1,134 |
| Total | 1,138 | 1,533 | 162 | 2,833 |
By task group:
| Source | G1 lookup | G2 multistep | G3 analysis |
|---|---|---|---|
| LFM2.5-2.6B | 0 | 1,362 | 17 |
| Claude Haiku 5.5 | 0 | 0 | 320 |
| Synthetic enrichment | 1,112 | 19 | 3 |
Why not SmolDataEnvs-sft
FineEnvs/SmolDataEnvs-sft is the existing SFT set for this environment. A custom set was generated instead because:
- Mixed harnesses. Its rows come from two agent harnesses (
bash,seta) with different habits, e.g. 71% ofsetarows use a "Plan:" scaffold. Every trajectory here follows one convention. - Lenient grading. Its grader takes the first number anywhere in the answer; 10.4% of re-gradable rows fail the stricter single-value grader used here.
- Better results. In a controlled comparison, LFM2.5-350M trained on this custom curated set outperformed the same model trained on SmolDataEnvs-sft.
Training
LoRA (r=16, alpha=32) with Unsloth and TRL, merged into 16-bit weights. Learning rate 4e-4, 3 epochs, effective batch size 16, max sequence length 16,384. Loss on all assistant turns.
Usage
Serve with vLLM and the LFM2 tool-call parser:
vllm serve lugman/LFM2.5-350M-SmolDataAgent --enable-auto-tool-choice --tool-call-parser lfm2
Pass the bash tool in the request and execute its calls in a sandbox. Each call is a fresh, non-stateful bash -c. The episode ends when the model replies without a tool call; read the answer from /workdir/answer.txt.
Recommended sampling: temperature 0.1, top_k 50, repetition_penalty 1.05, max_tokens 1024 per turn.
- Downloads last month
- 67
