Text Generation
Transformers
Safetensors
lfm2
liquid
lfm2.5
weight-editing
model-editing
json
training-free
conversational
Instructions to use yasserrmd/LFM2.5-1.2B-Instruct-WSP-JSONFix with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use yasserrmd/LFM2.5-1.2B-Instruct-WSP-JSONFix with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="yasserrmd/LFM2.5-1.2B-Instruct-WSP-JSONFix") 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("yasserrmd/LFM2.5-1.2B-Instruct-WSP-JSONFix") model = AutoModelForCausalLM.from_pretrained("yasserrmd/LFM2.5-1.2B-Instruct-WSP-JSONFix", 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 yasserrmd/LFM2.5-1.2B-Instruct-WSP-JSONFix with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "yasserrmd/LFM2.5-1.2B-Instruct-WSP-JSONFix" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "yasserrmd/LFM2.5-1.2B-Instruct-WSP-JSONFix", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/yasserrmd/LFM2.5-1.2B-Instruct-WSP-JSONFix
- SGLang
How to use yasserrmd/LFM2.5-1.2B-Instruct-WSP-JSONFix 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 "yasserrmd/LFM2.5-1.2B-Instruct-WSP-JSONFix" \ --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": "yasserrmd/LFM2.5-1.2B-Instruct-WSP-JSONFix", "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 "yasserrmd/LFM2.5-1.2B-Instruct-WSP-JSONFix" \ --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": "yasserrmd/LFM2.5-1.2B-Instruct-WSP-JSONFix", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use yasserrmd/LFM2.5-1.2B-Instruct-WSP-JSONFix with Docker Model Runner:
docker model run hf.co/yasserrmd/LFM2.5-1.2B-Instruct-WSP-JSONFix
Download wsp/selection.json from yasserrmd/LFM2.5-1.2B-Instruct-WSP-JSONFix: direct link, hf CLI and curl.
- Browser
- Download file 1.9 kB
-
https://huggingface.co/yasserrmd/LFM2.5-1.2B-Instruct-WSP-JSONFix/resolve/main/wsp/selection.json
- Command line
-
hf download hf://yasserrmd/LFM2.5-1.2B-Instruct-WSP-JSONFix/wsp/selection.json
-
curl -L -o selection.json https://huggingface.co/yasserrmd/LFM2.5-1.2B-Instruct-WSP-JSONFix/resolve/main/wsp/selection.json
1.9 kB
| { | |
| "selected": "c11", | |
| "frozen_before_test": true, | |
| "utc": "2026-11-18T17:24:09Z", | |
| "chosen_patch_sha256": "38b9bb6891edfe0064c76faf057e94f33ed7f77a8e08fb7088db7a53efc41d59", | |
| "reasoning": [ | |
| "Only c11 passed all six pre-registered gates on validation.", | |
| "c11: pooled B exact 209/256 vs base 171 (+38); matched random-position control 172 and same-column random-direction control 172.", | |
| "Greedy B 52 vs base 45; array exact 98 vs 73 with 0 lost base-correct array answers; A lost 1 (s2 count formatting), C/S/F lost 0; F_balanced 48 vs 45.", | |
| "Passage PPL -0.034% relative; KL first-token 0.459 (lowest of all candidates), KL passage 0.00154 (highest among candidates but tiny).", | |
| "Ranking is identical whether KL tie-break uses passage KL or first-token KL (only one passing candidate). Note: the KL variant for tie-breaking was fixed after c01-c09 results were seen; it did not affect the outcome.", | |
| "10 of 11 rejected candidates failed G5 (lost >=1 base-correct array answer), several also G3 (A/C losses); c09 failed G1/G2 (fences increased to 117)." | |
| ], | |
| "edits": [ | |
| { | |
| "param": "model.layers.12.feed_forward.w2.weight", | |
| "cols": [ | |
| 4731, | |
| 7264, | |
| 7919 | |
| ], | |
| "kind": "scale", | |
| "alpha": null, | |
| "scale": 0.5, | |
| "dir": "u" | |
| }, | |
| { | |
| "param": "model.layers.13.feed_forward.w2.weight", | |
| "cols": [ | |
| 488, | |
| 5186, | |
| 6715 | |
| ], | |
| "kind": "scale", | |
| "alpha": null, | |
| "scale": 0.5, | |
| "dir": "u" | |
| }, | |
| { | |
| "param": "model.layers.14.feed_forward.w2.weight", | |
| "cols": [ | |
| 3659 | |
| ], | |
| "kind": "scale", | |
| "alpha": null, | |
| "scale": 0.5, | |
| "dir": "u" | |
| }, | |
| { | |
| "param": "model.layers.15.feed_forward.w2.weight", | |
| "cols": [ | |
| 99, | |
| 532, | |
| 660, | |
| 926, | |
| 2017, | |
| 2439, | |
| 3263, | |
| 3682, | |
| 5191 | |
| ], | |
| "kind": "scale", | |
| "alpha": null, | |
| "scale": 0.5, | |
| "dir": "u" | |
| } | |
| ], | |
| "changed_scalars": 32768, | |
| "pct_unique": 0.0027998686686602605 | |
| } |