Text Generation
Transformers
Safetensors
qwen2
llama-factory
full
Generated from Trainer
conversational
text-generation-inference
Instructions to use realYinkaIyiola/Deepseek-R1-Distill-14B-Math with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use realYinkaIyiola/Deepseek-R1-Distill-14B-Math with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="realYinkaIyiola/Deepseek-R1-Distill-14B-Math") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("realYinkaIyiola/Deepseek-R1-Distill-14B-Math") model = AutoModelForCausalLM.from_pretrained("realYinkaIyiola/Deepseek-R1-Distill-14B-Math", 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use realYinkaIyiola/Deepseek-R1-Distill-14B-Math with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "realYinkaIyiola/Deepseek-R1-Distill-14B-Math" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "realYinkaIyiola/Deepseek-R1-Distill-14B-Math", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/realYinkaIyiola/Deepseek-R1-Distill-14B-Math
- SGLang
How to use realYinkaIyiola/Deepseek-R1-Distill-14B-Math 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 "realYinkaIyiola/Deepseek-R1-Distill-14B-Math" \ --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": "realYinkaIyiola/Deepseek-R1-Distill-14B-Math", "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 "realYinkaIyiola/Deepseek-R1-Distill-14B-Math" \ --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": "realYinkaIyiola/Deepseek-R1-Distill-14B-Math", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use realYinkaIyiola/Deepseek-R1-Distill-14B-Math with Docker Model Runner:
docker model run hf.co/realYinkaIyiola/Deepseek-R1-Distill-14B-Math
| {"current_steps": 100, "total_steps": 3528, "loss": 0.361, "lr": 2.8328611898017e-06, "epoch": 0.05668934240362812, "percentage": 2.83, "elapsed_time": "0:35:50", "remaining_time": "20:28:38"} | |
| {"current_steps": 200, "total_steps": 3528, "loss": 0.3349, "lr": 5.6657223796034e-06, "epoch": 0.11337868480725624, "percentage": 5.67, "elapsed_time": "1:10:32", "remaining_time": "19:33:41"} | |
| {"current_steps": 300, "total_steps": 3528, "loss": 0.332, "lr": 8.4985835694051e-06, "epoch": 0.17006802721088435, "percentage": 8.5, "elapsed_time": "1:46:24", "remaining_time": "19:04:53"} | |
| {"current_steps": 400, "total_steps": 3528, "loss": 0.3352, "lr": 9.994594078481824e-06, "epoch": 0.22675736961451248, "percentage": 11.34, "elapsed_time": "2:21:53", "remaining_time": "18:29:33"} | |
| {"current_steps": 500, "total_steps": 3528, "loss": 0.3324, "lr": 9.947201553489385e-06, "epoch": 0.2834467120181406, "percentage": 14.17, "elapsed_time": "2:57:13", "remaining_time": "17:53:17"} | |
| {"current_steps": 600, "total_steps": 3528, "loss": 0.3352, "lr": 9.851412130607201e-06, "epoch": 0.3401360544217687, "percentage": 17.01, "elapsed_time": "3:32:56", "remaining_time": "17:19:10"} | |
| {"current_steps": 700, "total_steps": 3528, "loss": 0.3357, "lr": 9.70816288726541e-06, "epoch": 0.3968253968253968, "percentage": 19.84, "elapsed_time": "4:09:10", "remaining_time": "16:46:38"} | |
| {"current_steps": 800, "total_steps": 3528, "loss": 0.3386, "lr": 9.518855185209205e-06, "epoch": 0.45351473922902497, "percentage": 22.68, "elapsed_time": "4:45:41", "remaining_time": "16:14:11"} | |
| {"current_steps": 900, "total_steps": 3528, "loss": 0.3369, "lr": 9.285340961422978e-06, "epoch": 0.5102040816326531, "percentage": 25.51, "elapsed_time": "5:21:41", "remaining_time": "15:39:21"} | |
| {"current_steps": 1000, "total_steps": 3528, "loss": 0.3386, "lr": 9.009904611220361e-06, "epoch": 0.5668934240362812, "percentage": 28.34, "elapsed_time": "5:56:39", "remaining_time": "15:01:37"} | |
| {"current_steps": 1000, "total_steps": 3528, "eval_loss": 0.3266855776309967, "epoch": 0.5668934240362812, "percentage": 28.34, "elapsed_time": "6:08:32", "remaining_time": "15:31:41"} | |
| {"current_steps": 1100, "total_steps": 3528, "loss": 0.3351, "lr": 8.695240640732093e-06, "epoch": 0.6235827664399093, "percentage": 31.18, "elapsed_time": "6:46:02", "remaining_time": "14:56:14"} | |
| {"current_steps": 1200, "total_steps": 3528, "loss": 0.3376, "lr": 8.344427307410323e-06, "epoch": 0.6802721088435374, "percentage": 34.01, "elapsed_time": "7:21:22", "remaining_time": "14:16:15"} | |
| {"current_steps": 1300, "total_steps": 3528, "loss": 0.335, "lr": 7.960896506415892e-06, "epoch": 0.7369614512471655, "percentage": 36.85, "elapsed_time": "7:58:52", "remaining_time": "13:40:42"} | |
| {"current_steps": 1400, "total_steps": 3528, "loss": 0.3347, "lr": 7.548400197480501e-06, "epoch": 0.7936507936507936, "percentage": 39.68, "elapsed_time": "8:34:18", "remaining_time": "13:01:44"} | |
| {"current_steps": 1500, "total_steps": 3528, "loss": 0.3346, "lr": 7.110973700679067e-06, "epoch": 0.8503401360544217, "percentage": 42.52, "elapsed_time": "9:10:58", "remaining_time": "12:24:55"} | |
| {"current_steps": 1600, "total_steps": 3528, "loss": 0.3377, "lr": 6.652896220178041e-06, "epoch": 0.9070294784580499, "percentage": 45.35, "elapsed_time": "9:47:47", "remaining_time": "11:48:17"} | |
| {"current_steps": 1700, "total_steps": 3528, "loss": 0.3284, "lr": 6.178648982143307e-06, "epoch": 0.963718820861678, "percentage": 48.19, "elapsed_time": "10:23:33", "remaining_time": "11:10:30"} | |
| {"current_steps": 1800, "total_steps": 3528, "loss": 0.3144, "lr": 5.692871396331168e-06, "epoch": 1.0204081632653061, "percentage": 51.02, "elapsed_time": "10:59:26", "remaining_time": "10:33:03"} | |
| {"current_steps": 1900, "total_steps": 3528, "loss": 0.276, "lr": 5.2003156702196275e-06, "epoch": 1.0770975056689343, "percentage": 53.85, "elapsed_time": "11:35:09", "remaining_time": "9:55:38"} | |
| {"current_steps": 2000, "total_steps": 3528, "loss": 0.2706, "lr": 4.705800319675462e-06, "epoch": 1.1337868480725624, "percentage": 56.69, "elapsed_time": "12:11:10", "remaining_time": "9:18:36"} | |
| {"current_steps": 2000, "total_steps": 3528, "eval_loss": 0.3267841041088104, "epoch": 1.1337868480725624, "percentage": 56.69, "elapsed_time": "12:23:03", "remaining_time": "9:27:41"} | |
| {"current_steps": 2100, "total_steps": 3528, "loss": 0.2785, "lr": 4.214163030947442e-06, "epoch": 1.1904761904761905, "percentage": 59.52, "elapsed_time": "13:01:43", "remaining_time": "8:51:34"} | |
| {"current_steps": 2200, "total_steps": 3528, "loss": 0.2756, "lr": 3.730213335121796e-06, "epoch": 1.2471655328798186, "percentage": 62.36, "elapsed_time": "13:37:43", "remaining_time": "8:13:36"} | |
| {"current_steps": 2300, "total_steps": 3528, "loss": 0.2774, "lr": 3.2586855580106876e-06, "epoch": 1.3038548752834467, "percentage": 65.19, "elapsed_time": "14:14:01", "remaining_time": "7:35:58"} | |
| {"current_steps": 2400, "total_steps": 3528, "loss": 0.2741, "lr": 2.8041925057499253e-06, "epoch": 1.3605442176870748, "percentage": 68.03, "elapsed_time": "14:49:42", "remaining_time": "6:58:09"} | |
| {"current_steps": 2500, "total_steps": 3528, "loss": 0.2697, "lr": 2.371180339184999e-06, "epoch": 1.417233560090703, "percentage": 70.86, "elapsed_time": "15:25:19", "remaining_time": "6:20:29"} | |
| {"current_steps": 2600, "total_steps": 3528, "loss": 0.2683, "lr": 1.963885078494927e-06, "epoch": 1.473922902494331, "percentage": 73.7, "elapsed_time": "16:01:00", "remaining_time": "5:43:00"} | |
| {"current_steps": 2700, "total_steps": 3528, "loss": 0.2728, "lr": 1.5862911635553614e-06, "epoch": 1.5306122448979593, "percentage": 76.53, "elapsed_time": "16:36:12", "remaining_time": "5:05:30"} | |
| {"current_steps": 2800, "total_steps": 3528, "loss": 0.2756, "lr": 1.2420924754316915e-06, "epoch": 1.5873015873015874, "percentage": 79.37, "elapsed_time": "17:12:21", "remaining_time": "4:28:24"} | |
| {"current_steps": 2900, "total_steps": 3528, "loss": 0.271, "lr": 9.346562003165193e-07, "epoch": 1.6439909297052155, "percentage": 82.2, "elapsed_time": "17:48:55", "remaining_time": "3:51:28"} | |
| {"current_steps": 3000, "total_steps": 3528, "loss": 0.2689, "lr": 6.669898894190413e-07, "epoch": 1.7006802721088436, "percentage": 85.03, "elapsed_time": "18:23:25", "remaining_time": "3:14:12"} | |
| {"current_steps": 3000, "total_steps": 3528, "eval_loss": 0.32290545105934143, "epoch": 1.7006802721088436, "percentage": 85.03, "elapsed_time": "18:35:18", "remaining_time": "3:16:17"} | |
| {"current_steps": 3100, "total_steps": 3528, "loss": 0.2701, "lr": 4.417120370490169e-07, "epoch": 1.7573696145124718, "percentage": 87.87, "elapsed_time": "19:12:16", "remaining_time": "2:39:05"} | |
| {"current_steps": 3200, "total_steps": 3528, "loss": 0.2683, "lr": 2.6102646472050463e-07, "epoch": 1.8140589569160999, "percentage": 90.7, "elapsed_time": "19:48:02", "remaining_time": "2:01:46"} | |
| {"current_steps": 3300, "total_steps": 3528, "loss": 0.2732, "lr": 1.2670076186756973e-07, "epoch": 1.870748299319728, "percentage": 93.54, "elapsed_time": "20:24:10", "remaining_time": "1:24:34"} | |
| {"current_steps": 3400, "total_steps": 3528, "loss": 0.27, "lr": 4.004899407954621e-08, "epoch": 1.927437641723356, "percentage": 96.37, "elapsed_time": "21:01:01", "remaining_time": "0:47:28"} | |
| {"current_steps": 3500, "total_steps": 3528, "loss": 0.2657, "lr": 1.9188480157023014e-09, "epoch": 1.9841269841269842, "percentage": 99.21, "elapsed_time": "21:37:00", "remaining_time": "0:10:22"} | |
| {"current_steps": 3528, "total_steps": 3528, "epoch": 2.0, "percentage": 100.0, "elapsed_time": "21:47:59", "remaining_time": "0:00:00"} | |