Instructions to use trl-internal-testing/tiny-DeepseekV3ForCausalLM-0528 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use trl-internal-testing/tiny-DeepseekV3ForCausalLM-0528 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="trl-internal-testing/tiny-DeepseekV3ForCausalLM-0528") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("trl-internal-testing/tiny-DeepseekV3ForCausalLM-0528") model = AutoModelForCausalLM.from_pretrained("trl-internal-testing/tiny-DeepseekV3ForCausalLM-0528", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use trl-internal-testing/tiny-DeepseekV3ForCausalLM-0528 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "trl-internal-testing/tiny-DeepseekV3ForCausalLM-0528" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "trl-internal-testing/tiny-DeepseekV3ForCausalLM-0528", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/trl-internal-testing/tiny-DeepseekV3ForCausalLM-0528
- SGLang
How to use trl-internal-testing/tiny-DeepseekV3ForCausalLM-0528 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 "trl-internal-testing/tiny-DeepseekV3ForCausalLM-0528" \ --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": "trl-internal-testing/tiny-DeepseekV3ForCausalLM-0528", "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 "trl-internal-testing/tiny-DeepseekV3ForCausalLM-0528" \ --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": "trl-internal-testing/tiny-DeepseekV3ForCausalLM-0528", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use trl-internal-testing/tiny-DeepseekV3ForCausalLM-0528 with Docker Model Runner:
docker model run hf.co/trl-internal-testing/tiny-DeepseekV3ForCausalLM-0528
Upload DeepseekV3ForCausalLM
#6
by qgallouedec HF Staff - opened
- config.json +11 -5
- model.safetensors +2 -2
config.json
CHANGED
|
@@ -1,7 +1,4 @@
|
|
| 1 |
{
|
| 2 |
-
"architectures": [
|
| 3 |
-
"DeepseekV3ForCausalLM"
|
| 4 |
-
],
|
| 5 |
"attention_bias": false,
|
| 6 |
"attention_dropout": 0.0,
|
| 7 |
"bos_token_id": 0,
|
|
@@ -11,9 +8,9 @@
|
|
| 11 |
"first_k_dense_replace": 3,
|
| 12 |
"head_dim": 64,
|
| 13 |
"hidden_act": "silu",
|
| 14 |
-
"hidden_size":
|
| 15 |
"initializer_range": 0.02,
|
| 16 |
-
"intermediate_size":
|
| 17 |
"kv_lora_rank": 512,
|
| 18 |
"max_position_embeddings": 163840,
|
| 19 |
"model_type": "deepseek_v3",
|
|
@@ -33,6 +30,15 @@
|
|
| 33 |
"qk_head_dim": 192,
|
| 34 |
"qk_nope_head_dim": 128,
|
| 35 |
"qk_rope_head_dim": 64,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
"rms_norm_eps": 1e-06,
|
| 37 |
"rope_interleave": true,
|
| 38 |
"rope_scaling": {
|
|
|
|
| 1 |
{
|
|
|
|
|
|
|
|
|
|
| 2 |
"attention_bias": false,
|
| 3 |
"attention_dropout": 0.0,
|
| 4 |
"bos_token_id": 0,
|
|
|
|
| 8 |
"first_k_dense_replace": 3,
|
| 9 |
"head_dim": 64,
|
| 10 |
"hidden_act": "silu",
|
| 11 |
+
"hidden_size": 128,
|
| 12 |
"initializer_range": 0.02,
|
| 13 |
+
"intermediate_size": 128,
|
| 14 |
"kv_lora_rank": 512,
|
| 15 |
"max_position_embeddings": 163840,
|
| 16 |
"model_type": "deepseek_v3",
|
|
|
|
| 30 |
"qk_head_dim": 192,
|
| 31 |
"qk_nope_head_dim": 128,
|
| 32 |
"qk_rope_head_dim": 64,
|
| 33 |
+
"quantization_config": {
|
| 34 |
+
"activation_scheme": "dynamic",
|
| 35 |
+
"fmt": "e4m3",
|
| 36 |
+
"quant_method": "fp8",
|
| 37 |
+
"weight_block_size": [
|
| 38 |
+
128,
|
| 39 |
+
128
|
| 40 |
+
]
|
| 41 |
+
},
|
| 42 |
"rms_norm_eps": 1e-06,
|
| 43 |
"rope_interleave": true,
|
| 44 |
"rope_scaling": {
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:aabcc745f97d1029745d467d62c6adb4643ed47b60c4506c0127836977db5224
|
| 3 |
+
size 68614632
|