Text Generation
Transformers
Safetensors
llada2_moe
dllm
diffusion
llm
text_generation
conversational
custom_code
Instructions to use inclusionAI/LLaDA2.1-mini with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use inclusionAI/LLaDA2.1-mini with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="inclusionAI/LLaDA2.1-mini", 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("inclusionAI/LLaDA2.1-mini", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use inclusionAI/LLaDA2.1-mini with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "inclusionAI/LLaDA2.1-mini" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "inclusionAI/LLaDA2.1-mini", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/inclusionAI/LLaDA2.1-mini
- SGLang
How to use inclusionAI/LLaDA2.1-mini 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 "inclusionAI/LLaDA2.1-mini" \ --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": "inclusionAI/LLaDA2.1-mini", "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 "inclusionAI/LLaDA2.1-mini" \ --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": "inclusionAI/LLaDA2.1-mini", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use inclusionAI/LLaDA2.1-mini with Docker Model Runner:
docker model run hf.co/inclusionAI/LLaDA2.1-mini
Commit History
-
fixes for transforemrs v5 (#4)
- fix: use linear rope_type instead of removed default for transformers compat (52747ba6635e4d9dae6e8fe10b80b548edd1a6bf) - fix: remap default rope_type to linear for newer transformers compat (0435edb8c737fb74e4b6ce4165d59706bccbf683) - fix: add default factor=1.0 for linear rope compat with newer transformers (220496f16154a7104b024ccc60766218eb55e2b2) - fix: align RotaryEmbedding with Qwen2Moe pattern for transformers compat (a0f450fc327e5f2701117985432dd8216ca7808d) - fix: call super()._init_weights() to match Qwen2Moe convention (1f0d143f54b68036b4a678571e4c6486d5f62dbb) - fix: align _init_weights with Qwen2Moe using nn.init API (92a5aa652b4ff6a2fa297d9f495fcded2081278c) - Use create_bidirectional_mask for backend-agnostic attention mask handling (SDPA, FA2, flex) (90c63c74a17158b85a28a02bfb729573f2e3616c) Co-authored-by: Kashif Rasul <kashif@users.noreply.huggingface.co>20e64e2 -
Insert tracking points on the ModelCard to track visit statistics
Verified signaturef51afaa
-
Update README.md
Verified signaturef21be03
-
Update README.md
Verified signaturebbb5715
-
Update README.md
Verified signaturec38df8b
-
Update modeling_llada2_moe.py
Verified signaturec60e761 -
Update README.md
Verified signature6d07958 -
Create README.md
Verified signaturec8ebb85 -
Update modeling_llada2_moe.py
Verified signaturec0b959e -
Create modeling_llada2_moe.py
Verified signature5430aaf -
Update configuration_llada2_moe.py
Verified signature276abc9 -
Add files using upload-large-folder tool
Verified signaturea8af0fb -
initial commit
Verified signature54d0b65