Text Generation
Transformers
PyTorch
Safetensors
English
llama
text-generation-inference
unsloth
trl
sft
conversational
8-bit precision
Instructions to use canbingol/DeepSeek-R1-Descartes-COT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use canbingol/DeepSeek-R1-Descartes-COT with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="canbingol/DeepSeek-R1-Descartes-COT") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("canbingol/DeepSeek-R1-Descartes-COT") model = AutoModelForCausalLM.from_pretrained("canbingol/DeepSeek-R1-Descartes-COT") 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use canbingol/DeepSeek-R1-Descartes-COT with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "canbingol/DeepSeek-R1-Descartes-COT" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "canbingol/DeepSeek-R1-Descartes-COT", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/canbingol/DeepSeek-R1-Descartes-COT
- SGLang
How to use canbingol/DeepSeek-R1-Descartes-COT 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 "canbingol/DeepSeek-R1-Descartes-COT" \ --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": "canbingol/DeepSeek-R1-Descartes-COT", "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 "canbingol/DeepSeek-R1-Descartes-COT" \ --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": "canbingol/DeepSeek-R1-Descartes-COT", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Studio new
How to use canbingol/DeepSeek-R1-Descartes-COT with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for canbingol/DeepSeek-R1-Descartes-COT to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for canbingol/DeepSeek-R1-Descartes-COT to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for canbingol/DeepSeek-R1-Descartes-COT to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="canbingol/DeepSeek-R1-Descartes-COT", max_seq_length=2048, ) - Docker Model Runner
How to use canbingol/DeepSeek-R1-Descartes-COT with Docker Model Runner:
docker model run hf.co/canbingol/DeepSeek-R1-Descartes-COT
Upload model trained with Unsloth
Browse filesUpload model trained with Unsloth 2x faster
- README.md +1 -0
- config.json +51 -0
- generation_config.json +11 -0
- model-00001-of-00002.safetensors +3 -0
- model-00002-of-00002.safetensors +3 -0
- model.safetensors.index.json +0 -0
README.md
CHANGED
|
@@ -6,6 +6,7 @@ tags:
|
|
| 6 |
- unsloth
|
| 7 |
- llama
|
| 8 |
- trl
|
|
|
|
| 9 |
license: apache-2.0
|
| 10 |
language:
|
| 11 |
- en
|
|
|
|
| 6 |
- unsloth
|
| 7 |
- llama
|
| 8 |
- trl
|
| 9 |
+
- sft
|
| 10 |
license: apache-2.0
|
| 11 |
language:
|
| 12 |
- en
|
config.json
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_name_or_path": "unsloth/deepseek-r1-distill-llama-8b-unsloth-bnb-4bit",
|
| 3 |
+
"architectures": [
|
| 4 |
+
"LlamaForCausalLM"
|
| 5 |
+
],
|
| 6 |
+
"attention_bias": false,
|
| 7 |
+
"attention_dropout": 0.0,
|
| 8 |
+
"bos_token_id": 128000,
|
| 9 |
+
"eos_token_id": 128001,
|
| 10 |
+
"head_dim": 128,
|
| 11 |
+
"hidden_act": "silu",
|
| 12 |
+
"hidden_size": 4096,
|
| 13 |
+
"initializer_range": 0.02,
|
| 14 |
+
"intermediate_size": 14336,
|
| 15 |
+
"max_position_embeddings": 131072,
|
| 16 |
+
"mlp_bias": false,
|
| 17 |
+
"model_type": "llama",
|
| 18 |
+
"num_attention_heads": 32,
|
| 19 |
+
"num_hidden_layers": 32,
|
| 20 |
+
"num_key_value_heads": 8,
|
| 21 |
+
"pad_token_id": 128004,
|
| 22 |
+
"pretraining_tp": 1,
|
| 23 |
+
"quantization_config": {
|
| 24 |
+
"bnb_4bit_compute_dtype": "float16",
|
| 25 |
+
"bnb_4bit_quant_type": "nf4",
|
| 26 |
+
"bnb_4bit_use_double_quant": true,
|
| 27 |
+
"llm_int8_enable_fp32_cpu_offload": false,
|
| 28 |
+
"llm_int8_has_fp16_weight": false,
|
| 29 |
+
"llm_int8_skip_modules": null,
|
| 30 |
+
"llm_int8_threshold": 6.0,
|
| 31 |
+
"load_in_4bit": true,
|
| 32 |
+
"load_in_8bit": false,
|
| 33 |
+
"quant_method": "bitsandbytes"
|
| 34 |
+
},
|
| 35 |
+
"rms_norm_eps": 1e-05,
|
| 36 |
+
"rope_scaling": {
|
| 37 |
+
"factor": 8.0,
|
| 38 |
+
"high_freq_factor": 4.0,
|
| 39 |
+
"low_freq_factor": 1.0,
|
| 40 |
+
"original_max_position_embeddings": 8192,
|
| 41 |
+
"rope_type": "llama3"
|
| 42 |
+
},
|
| 43 |
+
"rope_theta": 500000.0,
|
| 44 |
+
"tie_word_embeddings": false,
|
| 45 |
+
"torch_dtype": "float16",
|
| 46 |
+
"transformers_version": "4.48.2",
|
| 47 |
+
"unsloth_fixed": true,
|
| 48 |
+
"unsloth_version": "2025.1.8",
|
| 49 |
+
"use_cache": true,
|
| 50 |
+
"vocab_size": 128256
|
| 51 |
+
}
|
generation_config.json
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_from_model_config": true,
|
| 3 |
+
"bos_token_id": 128000,
|
| 4 |
+
"do_sample": true,
|
| 5 |
+
"eos_token_id": 128001,
|
| 6 |
+
"max_length": 131072,
|
| 7 |
+
"pad_token_id": 128004,
|
| 8 |
+
"temperature": 0.6,
|
| 9 |
+
"top_p": 0.95,
|
| 10 |
+
"transformers_version": "4.48.2"
|
| 11 |
+
}
|
model-00001-of-00002.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c9ed61279cd5326e16f59204a9e191a6a6d00c2e60688b6525766549b3539027
|
| 3 |
+
size 4986911615
|
model-00002-of-00002.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3dc420296210352f2059c35ac726dba4330df453d3986a2562af99146a12c33a
|
| 3 |
+
size 1145119846
|
model.safetensors.index.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|