Text Generation
Transformers
Safetensors
qwen2
llama-factory
conversational
text-generation-inference
Instructions to use isbondarev/DeepSeek-R1-Distill-Qwen-1.5B-adv with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use isbondarev/DeepSeek-R1-Distill-Qwen-1.5B-adv with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="isbondarev/DeepSeek-R1-Distill-Qwen-1.5B-adv") 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("isbondarev/DeepSeek-R1-Distill-Qwen-1.5B-adv") model = AutoModelForCausalLM.from_pretrained("isbondarev/DeepSeek-R1-Distill-Qwen-1.5B-adv", 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 isbondarev/DeepSeek-R1-Distill-Qwen-1.5B-adv with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "isbondarev/DeepSeek-R1-Distill-Qwen-1.5B-adv" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "isbondarev/DeepSeek-R1-Distill-Qwen-1.5B-adv", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/isbondarev/DeepSeek-R1-Distill-Qwen-1.5B-adv
- SGLang
How to use isbondarev/DeepSeek-R1-Distill-Qwen-1.5B-adv 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 "isbondarev/DeepSeek-R1-Distill-Qwen-1.5B-adv" \ --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": "isbondarev/DeepSeek-R1-Distill-Qwen-1.5B-adv", "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 "isbondarev/DeepSeek-R1-Distill-Qwen-1.5B-adv" \ --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": "isbondarev/DeepSeek-R1-Distill-Qwen-1.5B-adv", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use isbondarev/DeepSeek-R1-Distill-Qwen-1.5B-adv with Docker Model Runner:
docker model run hf.co/isbondarev/DeepSeek-R1-Distill-Qwen-1.5B-adv
Upload Qwen2ForCausalLM
Browse files- config.json +33 -3
- generation_config.json +1 -1
- model.safetensors +1 -1
config.json
CHANGED
|
@@ -4,11 +4,42 @@
|
|
| 4 |
],
|
| 5 |
"attention_dropout": 0.0,
|
| 6 |
"bos_token_id": 151643,
|
|
|
|
| 7 |
"eos_token_id": 151643,
|
| 8 |
"hidden_act": "silu",
|
| 9 |
"hidden_size": 1536,
|
| 10 |
"initializer_range": 0.02,
|
| 11 |
"intermediate_size": 8960,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
"max_position_embeddings": 131072,
|
| 13 |
"max_window_layers": 21,
|
| 14 |
"model_type": "qwen2",
|
|
@@ -18,10 +49,9 @@
|
|
| 18 |
"rms_norm_eps": 1e-06,
|
| 19 |
"rope_scaling": null,
|
| 20 |
"rope_theta": 10000,
|
| 21 |
-
"sliding_window":
|
| 22 |
"tie_word_embeddings": false,
|
| 23 |
-
"
|
| 24 |
-
"transformers_version": "4.52.4",
|
| 25 |
"use_cache": true,
|
| 26 |
"use_mrope": false,
|
| 27 |
"use_sliding_window": false,
|
|
|
|
| 4 |
],
|
| 5 |
"attention_dropout": 0.0,
|
| 6 |
"bos_token_id": 151643,
|
| 7 |
+
"dtype": "bfloat16",
|
| 8 |
"eos_token_id": 151643,
|
| 9 |
"hidden_act": "silu",
|
| 10 |
"hidden_size": 1536,
|
| 11 |
"initializer_range": 0.02,
|
| 12 |
"intermediate_size": 8960,
|
| 13 |
+
"layer_types": [
|
| 14 |
+
"full_attention",
|
| 15 |
+
"full_attention",
|
| 16 |
+
"full_attention",
|
| 17 |
+
"full_attention",
|
| 18 |
+
"full_attention",
|
| 19 |
+
"full_attention",
|
| 20 |
+
"full_attention",
|
| 21 |
+
"full_attention",
|
| 22 |
+
"full_attention",
|
| 23 |
+
"full_attention",
|
| 24 |
+
"full_attention",
|
| 25 |
+
"full_attention",
|
| 26 |
+
"full_attention",
|
| 27 |
+
"full_attention",
|
| 28 |
+
"full_attention",
|
| 29 |
+
"full_attention",
|
| 30 |
+
"full_attention",
|
| 31 |
+
"full_attention",
|
| 32 |
+
"full_attention",
|
| 33 |
+
"full_attention",
|
| 34 |
+
"full_attention",
|
| 35 |
+
"full_attention",
|
| 36 |
+
"full_attention",
|
| 37 |
+
"full_attention",
|
| 38 |
+
"full_attention",
|
| 39 |
+
"full_attention",
|
| 40 |
+
"full_attention",
|
| 41 |
+
"full_attention"
|
| 42 |
+
],
|
| 43 |
"max_position_embeddings": 131072,
|
| 44 |
"max_window_layers": 21,
|
| 45 |
"model_type": "qwen2",
|
|
|
|
| 49 |
"rms_norm_eps": 1e-06,
|
| 50 |
"rope_scaling": null,
|
| 51 |
"rope_theta": 10000,
|
| 52 |
+
"sliding_window": null,
|
| 53 |
"tie_word_embeddings": false,
|
| 54 |
+
"transformers_version": "4.57.1",
|
|
|
|
| 55 |
"use_cache": true,
|
| 56 |
"use_mrope": false,
|
| 57 |
"use_sliding_window": false,
|
generation_config.json
CHANGED
|
@@ -5,5 +5,5 @@
|
|
| 5 |
"eos_token_id": 151643,
|
| 6 |
"temperature": 0.6,
|
| 7 |
"top_p": 0.95,
|
| 8 |
-
"transformers_version": "4.
|
| 9 |
}
|
|
|
|
| 5 |
"eos_token_id": 151643,
|
| 6 |
"temperature": 0.6,
|
| 7 |
"top_p": 0.95,
|
| 8 |
+
"transformers_version": "4.57.1"
|
| 9 |
}
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 3554214752
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8e697d9e4e22322b6b8c607103331eb837cdecef1b9d122ecf7f2cc51ef92e70
|
| 3 |
size 3554214752
|