Text Generation
Transformers
Safetensors
llada
feature-extraction
diffusion
fast-inference
d3llm
conversational
custom_code
Instructions to use d3LLM/d3LLM_LLaDA with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use d3LLM/d3LLM_LLaDA with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="d3LLM/d3LLM_LLaDA", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("d3LLM/d3LLM_LLaDA", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use d3LLM/d3LLM_LLaDA with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "d3LLM/d3LLM_LLaDA" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "d3LLM/d3LLM_LLaDA", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/d3LLM/d3LLM_LLaDA
- SGLang
How to use d3LLM/d3LLM_LLaDA 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 "d3LLM/d3LLM_LLaDA" \ --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": "d3LLM/d3LLM_LLaDA", "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 "d3LLM/d3LLM_LLaDA" \ --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": "d3LLM/d3LLM_LLaDA", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use d3LLM/d3LLM_LLaDA with Docker Model Runner:
docker model run hf.co/d3LLM/d3LLM_LLaDA
Chien commited on
Upload config.json with huggingface_hub
Browse files- config.json +56 -0
config.json
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_name_or_path": "GSAI-ML/LLaDA-8B-Instruct",
|
| 3 |
+
"activation_type": "silu",
|
| 4 |
+
"alibi": false,
|
| 5 |
+
"alibi_bias_max": 8.0,
|
| 6 |
+
"architectures": [
|
| 7 |
+
"LLaDAModelLM"
|
| 8 |
+
],
|
| 9 |
+
"attention_dropout": 0.0,
|
| 10 |
+
"attention_layer_norm": false,
|
| 11 |
+
"attention_layer_norm_with_affine": true,
|
| 12 |
+
"auto_map": {
|
| 13 |
+
"AutoConfig": "GSAI-ML/LLaDA-8B-Instruct--configuration_llada.LLaDAConfig",
|
| 14 |
+
"AutoModel": "GSAI-ML/LLaDA-8B-Instruct--modeling_llada.LLaDAModelLM",
|
| 15 |
+
"AutoModelForCausalLM": "GSAI-ML/LLaDA-8B-Instruct--modeling_llada.LLaDAModelLM"
|
| 16 |
+
},
|
| 17 |
+
"bias_for_layer_norm": false,
|
| 18 |
+
"block_group_size": 1,
|
| 19 |
+
"block_type": "llama",
|
| 20 |
+
"d_model": 4096,
|
| 21 |
+
"embedding_dropout": 0.0,
|
| 22 |
+
"embedding_size": 126464,
|
| 23 |
+
"eos_token_id": 126081,
|
| 24 |
+
"flash_attention": false,
|
| 25 |
+
"include_bias": false,
|
| 26 |
+
"include_qkv_bias": false,
|
| 27 |
+
"init_cutoff_factor": null,
|
| 28 |
+
"init_device": "meta",
|
| 29 |
+
"init_fn": "mitchell",
|
| 30 |
+
"init_std": 0.02,
|
| 31 |
+
"input_emb_norm": false,
|
| 32 |
+
"layer_norm_type": "rms",
|
| 33 |
+
"layer_norm_with_affine": true,
|
| 34 |
+
"mask_token_id": 126336,
|
| 35 |
+
"max_sequence_length": 4096,
|
| 36 |
+
"mlp_hidden_size": 12288,
|
| 37 |
+
"mlp_ratio": 4,
|
| 38 |
+
"model_type": "llada",
|
| 39 |
+
"multi_query_attention": null,
|
| 40 |
+
"n_heads": 32,
|
| 41 |
+
"n_kv_heads": 32,
|
| 42 |
+
"n_layers": 32,
|
| 43 |
+
"pad_token_id": 126081,
|
| 44 |
+
"precision": "amp_bf16",
|
| 45 |
+
"residual_dropout": 0.0,
|
| 46 |
+
"rms_norm_eps": 1e-05,
|
| 47 |
+
"rope": true,
|
| 48 |
+
"rope_full_precision": true,
|
| 49 |
+
"rope_theta": 500000.0,
|
| 50 |
+
"scale_logits": false,
|
| 51 |
+
"torch_dtype": "bfloat16",
|
| 52 |
+
"transformers_version": "4.49.0",
|
| 53 |
+
"use_cache": false,
|
| 54 |
+
"vocab_size": 126464,
|
| 55 |
+
"weight_tying": false
|
| 56 |
+
}
|