Instructions to use yujiepan/deepseek-v4-tiny-random with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use yujiepan/deepseek-v4-tiny-random with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="yujiepan/deepseek-v4-tiny-random")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("yujiepan/deepseek-v4-tiny-random") model = AutoModelForCausalLM.from_pretrained("yujiepan/deepseek-v4-tiny-random") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use yujiepan/deepseek-v4-tiny-random with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "yujiepan/deepseek-v4-tiny-random" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "yujiepan/deepseek-v4-tiny-random", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/yujiepan/deepseek-v4-tiny-random
- SGLang
How to use yujiepan/deepseek-v4-tiny-random 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 "yujiepan/deepseek-v4-tiny-random" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "yujiepan/deepseek-v4-tiny-random", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "yujiepan/deepseek-v4-tiny-random" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "yujiepan/deepseek-v4-tiny-random", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use yujiepan/deepseek-v4-tiny-random with Docker Model Runner:
docker model run hf.co/yujiepan/deepseek-v4-tiny-random
| { | |
| "max_batch_size": 4, | |
| "max_seq_len": 65536, | |
| "dtype": "fp8", | |
| "scale_fmt": "ue8m0", | |
| "expert_dtype": "fp4", | |
| "scale_dtype": "fp8", | |
| "vocab_size": 129280, | |
| "dim": 128, | |
| "moe_inter_dim": 256, | |
| "n_layers": 7, | |
| "n_hash_layers": 3, | |
| "n_mtp_layers": 1, | |
| "n_heads": 8, | |
| "n_routed_experts": 32, | |
| "n_shared_experts": 1, | |
| "n_activated_experts": 6, | |
| "score_func": "sqrtsoftplus", | |
| "route_scale": 1.5, | |
| "swiglu_limit": 10.0, | |
| "q_lora_rank": 128, | |
| "head_dim": 128, | |
| "rope_head_dim": 64, | |
| "norm_eps": 1e-06, | |
| "o_groups": 8, | |
| "o_lora_rank": 128, | |
| "window_size": 128, | |
| "compress_ratios": [ | |
| 0, | |
| 0, | |
| 4, | |
| 128, | |
| 4, | |
| 128, | |
| 4, | |
| 0 | |
| ], | |
| "compress_rope_theta": 160000.0, | |
| "original_seq_len": 65536, | |
| "rope_theta": 10000.0, | |
| "rope_factor": 16.0, | |
| "beta_fast": 32, | |
| "beta_slow": 1, | |
| "index_n_heads": 4, | |
| "index_head_dim": 128, | |
| "index_topk": 512, | |
| "hc_mult": 4, | |
| "hc_sinkhorn_iters": 20, | |
| "hc_eps": 1e-06 | |
| } |