Text Generation
Transformers
Safetensors
lfm2_moe
diffusion
lfm2
lfm2.5
Mixture of Experts
code-generation
lora-merged
experimental
conversational
custom_code
Run this model with HF Jobs
Run summerAIO/diffusion-lfm2.5-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/summerAIO/diffusion-lfm2.5-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/summerAIO/diffusion-lfm2.5-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/summerAIO/diffusion-lfm2.5-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/summerAIO/diffusion-lfm2.5-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.
Instructions to use summerAIO/diffusion-lfm2.5-24b-a2b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use summerAIO/diffusion-lfm2.5-24b-a2b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="summerAIO/diffusion-lfm2.5-24b-a2b", trust_remote_code=True) 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("summerAIO/diffusion-lfm2.5-24b-a2b", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("summerAIO/diffusion-lfm2.5-24b-a2b", trust_remote_code=True, 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 summerAIO/diffusion-lfm2.5-24b-a2b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "summerAIO/diffusion-lfm2.5-24b-a2b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "summerAIO/diffusion-lfm2.5-24b-a2b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/summerAIO/diffusion-lfm2.5-24b-a2b
- SGLang
How to use summerAIO/diffusion-lfm2.5-24b-a2b 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 "summerAIO/diffusion-lfm2.5-24b-a2b" \ --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": "summerAIO/diffusion-lfm2.5-24b-a2b", "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 "summerAIO/diffusion-lfm2.5-24b-a2b" \ --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": "summerAIO/diffusion-lfm2.5-24b-a2b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use summerAIO/diffusion-lfm2.5-24b-a2b with Docker Model Runner:
docker model run hf.co/summerAIO/diffusion-lfm2.5-24b-a2b
Download quality-selection-summary.json from summerAIO/diffusion-lfm2.5-24b-a2b: direct link, hf CLI and curl.
- Browser
- Download file 2.7 kB
-
https://huggingface.co/summerAIO/diffusion-lfm2.5-24b-a2b/resolve/main/quality-selection-summary.json
- Command line
-
hf download hf://summerAIO/diffusion-lfm2.5-24b-a2b/quality-selection-summary.json
-
curl -L -o quality-selection-summary.json https://huggingface.co/summerAIO/diffusion-lfm2.5-24b-a2b/resolve/main/quality-selection-summary.json
2.7 kB
| { | |
| "steps_tested": 15, | |
| "quality_approved_steps": [], | |
| "best_quality_setting": null, | |
| "reason": "All tested settings failed at least one held-out code, exact answer, or generation-health check.", | |
| "verified_speed_500_to_700_tokps": [ | |
| { | |
| "block_size": 256, | |
| "steps": 4, | |
| "median_tokps": 583.931875195536, | |
| "long_health": { | |
| "alphabetic_fraction": 0.05560791705937795, | |
| "distinct_4gram_ratio": 0.04897159647404505, | |
| "longest_identical_token_run": 526, | |
| "pass_screen": false | |
| } | |
| }, | |
| { | |
| "block_size": 512, | |
| "steps": 7, | |
| "median_tokps": 639.1644566581542, | |
| "long_health": { | |
| "alphabetic_fraction": 0.1011743450767841, | |
| "distinct_4gram_ratio": 0.04995102840352596, | |
| "longest_identical_token_run": 914, | |
| "pass_screen": false | |
| } | |
| }, | |
| { | |
| "block_size": 512, | |
| "steps": 8, | |
| "median_tokps": 559.6046788602476, | |
| "long_health": { | |
| "alphabetic_fraction": 0.0947176684881603, | |
| "distinct_4gram_ratio": 0.04211557296767875, | |
| "longest_identical_token_run": 927, | |
| "pass_screen": false | |
| } | |
| }, | |
| { | |
| "block_size": 512, | |
| "steps": 9, | |
| "median_tokps": 497.3790361543517, | |
| "long_health": { | |
| "alphabetic_fraction": 0.1055004508566276, | |
| "distinct_4gram_ratio": 0.04897159647404505, | |
| "longest_identical_token_run": 916, | |
| "pass_screen": false | |
| } | |
| }, | |
| { | |
| "block_size": 1024, | |
| "steps": 11, | |
| "median_tokps": 656.0337779697369, | |
| "long_health": { | |
| "alphabetic_fraction": 0.10171017101710171, | |
| "distinct_4gram_ratio": 0.03330068560235064, | |
| "longest_identical_token_run": 923, | |
| "pass_screen": false | |
| } | |
| }, | |
| { | |
| "block_size": 1024, | |
| "steps": 12, | |
| "median_tokps": 601.9543854074814, | |
| "long_health": { | |
| "alphabetic_fraction": 0.10743061772605192, | |
| "distinct_4gram_ratio": 0.03819784524975514, | |
| "longest_identical_token_run": 924, | |
| "pass_screen": false | |
| } | |
| }, | |
| { | |
| "block_size": 1024, | |
| "steps": 13, | |
| "median_tokps": 555.3291700396725, | |
| "long_health": { | |
| "alphabetic_fraction": 0.13823272090988625, | |
| "distinct_4gram_ratio": 0.058765915768854066, | |
| "longest_identical_token_run": 944, | |
| "pass_screen": false | |
| } | |
| }, | |
| { | |
| "block_size": 1024, | |
| "steps": 14, | |
| "median_tokps": 514.9606330424041, | |
| "long_health": { | |
| "alphabetic_fraction": 0.13127753303964756, | |
| "distinct_4gram_ratio": 0.05582761998041136, | |
| "longest_identical_token_run": 908, | |
| "pass_screen": false | |
| } | |
| } | |
| ] | |
| } |