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
File size: 1,987 Bytes
e19a9c3 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | {
"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
}
}
}
|