Text Generation
Transformers
Safetensors
English
llada2_moe
diffusion-lm
llada
orl
on-policy-residual-learning
conversational
custom_code
Instructions to use yifanyu/LLaDA2.1-mini-ORL with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use yifanyu/LLaDA2.1-mini-ORL with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="yifanyu/LLaDA2.1-mini-ORL", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("yifanyu/LLaDA2.1-mini-ORL", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use yifanyu/LLaDA2.1-mini-ORL with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "yifanyu/LLaDA2.1-mini-ORL" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "yifanyu/LLaDA2.1-mini-ORL", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/yifanyu/LLaDA2.1-mini-ORL
- SGLang
How to use yifanyu/LLaDA2.1-mini-ORL 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 "yifanyu/LLaDA2.1-mini-ORL" \ --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": "yifanyu/LLaDA2.1-mini-ORL", "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 "yifanyu/LLaDA2.1-mini-ORL" \ --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": "yifanyu/LLaDA2.1-mini-ORL", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use yifanyu/LLaDA2.1-mini-ORL with Docker Model Runner:
docker model run hf.co/yifanyu/LLaDA2.1-mini-ORL
Download paper_decoding.json from yifanyu/LLaDA2.1-mini-ORL: direct link, hf CLI and curl.
- Browser
- Download file 1.99 kB
-
https://huggingface.co/yifanyu/LLaDA2.1-mini-ORL/resolve/main/paper_decoding.json
- Command line
-
hf download hf://yifanyu/LLaDA2.1-mini-ORL/paper_decoding.json
-
curl -L -o paper_decoding.json https://huggingface.co/yifanyu/LLaDA2.1-mini-ORL/resolve/main/paper_decoding.json
1.99 kB
| { | |
| "engine": { | |
| "runtime_env": "LLADA_RUNTIME_ROOT", | |
| "engine_revision": "f2230a5c2fcca72440d6c3fea4b50441b7d7516c", | |
| "image": "docker.io/lmsysorg/sglang@sha256:065d403274324cc9dec4f830ca62540e6ac586746e1aed268c98a2b347d5853f", | |
| "algorithm": "SDARPrefixKV", | |
| "tensor_parallel_size": 1, | |
| "request_concurrency": 1, | |
| "mem_fraction_static": 0.6, | |
| "attention_backend": "flashinfer", | |
| "disable_radix_cache": true, | |
| "disable_cuda_graph": false, | |
| "cuda_graph_batch_sizes": [ | |
| 1, | |
| 2 | |
| ], | |
| "context_length": null, | |
| "context_policy": "No explicit override in verified multi_gen engine; supplied model/runtime default" | |
| }, | |
| "sampling": { | |
| "temperature": 0.0, | |
| "temperature_min": 0.0, | |
| "temperature_max": 0.0, | |
| "top_k": 0, | |
| "top_p": 1.0 | |
| }, | |
| "decoder_common": { | |
| "confidence_temperature": 1.0, | |
| "confidence_temperature_mode": "fixed", | |
| "accept_rule": "prob_threshold", | |
| "edit_threshold": 0.5, | |
| "block_size": 32, | |
| "denoising_steps": 32, | |
| "max_steps_per_block": 32, | |
| "force_accept_leftmost": true, | |
| "allow_accepted_change": true, | |
| "post_accept_refine_steps": 16, | |
| "active_input_mode": "exact", | |
| "adjacent_entropy_contraction": true, | |
| "edit_shield_eos": false, | |
| "edit_shield_eos_window": 0, | |
| "deterministic_randtok": true, | |
| "randtok_seed": 12345, | |
| "logits_shift": false, | |
| "noise_mode": "mask", | |
| "random_token_high": 156895, | |
| "self_conditioning_post_norm": false, | |
| "self_conditioning_residual_scale": 1.0, | |
| "causal_prefill": true, | |
| "block_causal_prefill": true, | |
| "prompt_tail_in_first_block": true, | |
| "commit_mode": "fused_next" | |
| }, | |
| "role": { | |
| "decoder": { | |
| "prob_threshold": 0.85 | |
| }, | |
| "benchmark_decoder": {}, | |
| "max_new_tokens": { | |
| "gsm8k": 4096, | |
| "math500": 4096, | |
| "humaneval": 4096, | |
| "mbpp": 4096, | |
| "aime": 16384, | |
| "gpqa": 16384, | |
| "mmlu_pro": 4096, | |
| "lcb": 4096, | |
| "ifeval": 2048 | |
| } | |
| } | |
| } | |