Run this model with HF Jobs

Run LiquidAI/LFM2-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/LiquidAI/LFM2-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/LiquidAI/LFM2-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/LiquidAI/LFM2-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/LiquidAI/LFM2-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.
Grant Williams commited on
Commit
6c1bfca
·
verified ·
1 Parent(s): 8ef52d1

Fix chat template: render assistant tool_calls history

Browse files

Thanks for LFM2. The 24B's tool discipline measured impressively in our runs.

Defect: the shipped message loop renders `content` but never renders a past assistant turn's `tool_calls`. OpenAI-compatible clients replay history in that standard form, so the template emits an empty assistant turn and removes the model's action history.

The 24B is more robust than the 1.2B when history is missing. Its 4-step chains survive, but the tested 6-step chains lose steps 5 and 6. On the official Q4_K_M GGUF with temperature 0.1, top_k 50, and llama.cpp, the shipped template scored ordered 0/3 and exact 0/3 on those 6-step runs.

With this fix, the like-for-like 6-step runs scored ordered 3/3 and exact 3/3: six requested calls in order, nothing extra, with grounded and correct final answers. The combined seeded suite of three 4-step and three 6-step runs scored ordered 6/6 and exact 6/6 with no middleware. The route doctor's verdict also changed from a template-history failure to healthy.

Fix: port the LFM2.5-8B-A1B tool-call macros into this template's message loop while preserving the 24B template's multimodal handling. Everything outside the tool-call path remains byte-identical. The standalone regression test covers the defect, fixed rendering, tool-free byte equality, list-form multimodal content, null content, hostile values, and malformed call shapes.

The patch deliberately follows the current 8B-family argument formatting. Any family-wide string-escaping policy belongs in a separate discussion rather than a hidden 24B-only change.

GGUF users receive the fix through a re-converted GGUF or `llama-server --jinja --chat-template-file <this file>`, which is how we verified it live.

Happy to adjust anything to your conventions.

Evidence, wire excerpts, regression tests, and reproductions:
https://github.com/graphometer/droplet/tree/main/public/evidence

Disclosure: prepared with heavy AI assistance; every claim above comes from recorded runs that can be inspected. Not affiliated with, endorsed by, or connected to Liquid AI.

1 file changed +31 -3
chat_template.jinja+31-3