Text Generation
Transformers
PyTorch
MLX
English
tree-attention
apple-m4
mps
structured-generation
parallel-decoding
constrained-decoding
apple-silicon
classification
json
Instructions to use epsilon3/Qwen-2.5-1B-RLCD-Fast with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use epsilon3/Qwen-2.5-1B-RLCD-Fast with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="epsilon3/Qwen-2.5-1B-RLCD-Fast")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("epsilon3/Qwen-2.5-1B-RLCD-Fast", device_map="auto") - MLX
How to use epsilon3/Qwen-2.5-1B-RLCD-Fast with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # if on a CUDA device, also pip install mlx[cuda] # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("epsilon3/Qwen-2.5-1B-RLCD-Fast") prompt = "Once upon a time in" text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- vLLM
How to use epsilon3/Qwen-2.5-1B-RLCD-Fast with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "epsilon3/Qwen-2.5-1B-RLCD-Fast" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "epsilon3/Qwen-2.5-1B-RLCD-Fast", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/epsilon3/Qwen-2.5-1B-RLCD-Fast
- SGLang
How to use epsilon3/Qwen-2.5-1B-RLCD-Fast 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 "epsilon3/Qwen-2.5-1B-RLCD-Fast" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "epsilon3/Qwen-2.5-1B-RLCD-Fast", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "epsilon3/Qwen-2.5-1B-RLCD-Fast" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "epsilon3/Qwen-2.5-1B-RLCD-Fast", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - MLX LM
How to use epsilon3/Qwen-2.5-1B-RLCD-Fast with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Generate some text mlx_lm.generate --model "epsilon3/Qwen-2.5-1B-RLCD-Fast" --prompt "Once upon a time"
- Docker Model Runner
How to use epsilon3/Qwen-2.5-1B-RLCD-Fast with Docker Model Runner:
docker model run hf.co/epsilon3/Qwen-2.5-1B-RLCD-Fast
- Atomic Chat
Download mac_mps_continuation.json from epsilon3/Qwen-2.5-1B-RLCD-Fast: direct link, hf CLI and curl.
- Browser
- Download file 3.52 kB
-
https://huggingface.co/epsilon3/Qwen-2.5-1B-RLCD-Fast/resolve/main/mac_mps_continuation.json
- Command line
-
hf download hf://epsilon3/Qwen-2.5-1B-RLCD-Fast/mac_mps_continuation.json
-
curl -L -o mac_mps_continuation.json https://huggingface.co/epsilon3/Qwen-2.5-1B-RLCD-Fast/resolve/main/mac_mps_continuation.json
3.52 kB
| { | |
| "environment": { | |
| "model": "Qwen/Qwen2.5-1.5B-Instruct", | |
| "revision": "989aa7980e4cf806f80c7fef2b1adb7bc71aa306", | |
| "torch": "2.11.0", | |
| "transformers": "4.57.6", | |
| "gpu": "mps", | |
| "platform": "macOS-26.6.2-arm64-arm-64bit", | |
| "dtype": "torch.float16", | |
| "attention": "sdpa" | |
| }, | |
| "arguments": { | |
| "model": "Qwen/Qwen2.5-1.5B-Instruct", | |
| "presets": [ | |
| "fintech_fraud" | |
| ], | |
| "fields": [ | |
| 4 | |
| ], | |
| "steps": 4, | |
| "repeats": 8, | |
| "warmup": 2, | |
| "output": "mac_mps_continuation.json", | |
| "device": "mps", | |
| "dtype": "float16" | |
| }, | |
| "cases": [ | |
| { | |
| "preset": "fintech_fraud", | |
| "fields": 4, | |
| "prefix_tokens": 291, | |
| "suffix_tokens": 28, | |
| "batch_padded_tokens": 32, | |
| "correctness": { | |
| "max_abs_logit_error": 0.0390625, | |
| "mean_abs_logit_error": 0.005111373495310545, | |
| "full_vocab_argmax_agreement": 1.0, | |
| "candidate_decisions_equal": true, | |
| "candidate_disagreements": [], | |
| "candidate_collision_fields": [] | |
| }, | |
| "decode": { | |
| "batch": { | |
| "median_ms": 222.27393699722597, | |
| "min_ms": 218.0314580036793, | |
| "p90_ms": 225.18500000296626, | |
| "samples_ms": [ | |
| 218.92137500981335, | |
| 218.0314580036793, | |
| 218.31691700208467, | |
| 221.5709159936523, | |
| 222.97695800079964, | |
| 225.18500000296626, | |
| 224.5981669984758, | |
| 223.11737500422169 | |
| ] | |
| }, | |
| "tree": { | |
| "median_ms": 92.20895849284716, | |
| "min_ms": 91.14341699751094, | |
| "p90_ms": 93.54945798986591, | |
| "samples_ms": [ | |
| 91.56537499802653, | |
| 91.14341699751094, | |
| 92.22362498985603, | |
| 91.70979099872056, | |
| 92.8215000021737, | |
| 93.54945798986591, | |
| 92.19429199583828, | |
| 92.9221249971306 | |
| ] | |
| } | |
| }, | |
| "end_to_end": { | |
| "batch": { | |
| "median_ms": 363.8185415038606, | |
| "min_ms": 360.70520800421946, | |
| "p90_ms": 368.3792500087293, | |
| "samples_ms": [ | |
| 362.8430419921642, | |
| 364.4052500021644, | |
| 360.70520800421946, | |
| 366.33004099712707, | |
| 368.3792500087293, | |
| 361.49850000219885, | |
| 363.23183300555684, | |
| 364.8465419973945 | |
| ] | |
| }, | |
| "tree": { | |
| "median_ms": 236.11554150556913, | |
| "min_ms": 235.26033300731797, | |
| "p90_ms": 242.17433400917798, | |
| "samples_ms": [ | |
| 235.6036670098547, | |
| 236.22883300413378, | |
| 237.20962500374299, | |
| 235.26033300731797, | |
| 242.17433400917798, | |
| 236.00225000700448, | |
| 235.61708399211057, | |
| 237.31533299724106 | |
| ] | |
| } | |
| }, | |
| "memory": { | |
| "batch": { | |
| "driver_high_water_mib": 3372.140625, | |
| "extra_driver_mib": 204.0 | |
| }, | |
| "tree": { | |
| "driver_high_water_mib": 3196.140625, | |
| "extra_driver_mib": 40.0 | |
| } | |
| }, | |
| "decode_speedup": 2.410546010173927, | |
| "end_to_end_speedup": 1.5408496161836913, | |
| "decode_speedup_ci95": [ | |
| 2.370532995531195, | |
| 2.427722584229317 | |
| ], | |
| "end_to_end_speedup_ci95": [ | |
| 1.5291795474631322, | |
| 1.5495758989220285 | |
| ] | |
| } | |
| ] | |
| } | |