Text Generation
Transformers
Safetensors
deepseek_v4
deepseek-v4
mixture-of-experts
Mixture of Experts
mhc
csa
hca
scaffold
random-init
conversational
Instructions to use kshitijthakkar/deepseek-v4-mini-1B-init with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use kshitijthakkar/deepseek-v4-mini-1B-init with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="kshitijthakkar/deepseek-v4-mini-1B-init") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("kshitijthakkar/deepseek-v4-mini-1B-init") model = AutoModelForCausalLM.from_pretrained("kshitijthakkar/deepseek-v4-mini-1B-init") 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 kshitijthakkar/deepseek-v4-mini-1B-init with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "kshitijthakkar/deepseek-v4-mini-1B-init" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "kshitijthakkar/deepseek-v4-mini-1B-init", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/kshitijthakkar/deepseek-v4-mini-1B-init
- SGLang
How to use kshitijthakkar/deepseek-v4-mini-1B-init 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 "kshitijthakkar/deepseek-v4-mini-1B-init" \ --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": "kshitijthakkar/deepseek-v4-mini-1B-init", "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 "kshitijthakkar/deepseek-v4-mini-1B-init" \ --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": "kshitijthakkar/deepseek-v4-mini-1B-init", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use kshitijthakkar/deepseek-v4-mini-1B-init with Docker Model Runner:
docker model run hf.co/kshitijthakkar/deepseek-v4-mini-1B-init
| { | |
| "architectures": [ | |
| "DeepseekV4ForCausalLM" | |
| ], | |
| "attention_bias": false, | |
| "attention_dropout": 0.0, | |
| "bos_token_id": 0, | |
| "compress_ratios": [ | |
| 0, | |
| 0, | |
| 4, | |
| 96, | |
| 4, | |
| 96, | |
| 4, | |
| 96, | |
| 4, | |
| 96, | |
| 4, | |
| 96, | |
| 4, | |
| 96, | |
| 4, | |
| 96, | |
| 4, | |
| 96, | |
| 4, | |
| 96, | |
| 4, | |
| 96, | |
| 4, | |
| 0 | |
| ], | |
| "compress_rope_theta": 160000.0, | |
| "dtype": "bfloat16", | |
| "eos_token_id": 1, | |
| "hc_eps": 1e-06, | |
| "hc_mult": 4, | |
| "hc_sinkhorn_iters": 20, | |
| "head_dim": 64, | |
| "hidden_act": "silu", | |
| "hidden_size": 1024, | |
| "index_head_dim": 64, | |
| "index_n_heads": 8, | |
| "index_topk": 128, | |
| "initializer_range": 0.02, | |
| "max_position_embeddings": 1048576, | |
| "model_type": "deepseek_v4", | |
| "moe_intermediate_size": 512, | |
| "n_routed_experts": 16, | |
| "n_shared_experts": 1, | |
| "norm_topk_prob": true, | |
| "num_attention_heads": 16, | |
| "num_experts_per_tok": 2, | |
| "num_hash_layers": 2, | |
| "num_hidden_layers": 24, | |
| "num_key_value_heads": 1, | |
| "num_nextn_predict_layers": 1, | |
| "o_groups": 4, | |
| "o_lora_rank": 384, | |
| "pad_token_id": null, | |
| "q_lora_rank": 384, | |
| "qk_rope_head_dim": 32, | |
| "rms_norm_eps": 1e-06, | |
| "rope_parameters": { | |
| "beta_fast": 32.0, | |
| "beta_slow": 1.0, | |
| "factor": 16.0, | |
| "original_max_position_embeddings": 65536, | |
| "rope_theta": 10000.0, | |
| "rope_type": "yarn", | |
| "type": "yarn" | |
| }, | |
| "rope_theta": 10000.0, | |
| "routed_scaling_factor": 1.5, | |
| "scoring_func": "sqrtsoftplus", | |
| "sliding_window": 64, | |
| "swiglu_limit": 10.0, | |
| "tie_word_embeddings": false, | |
| "topk_method": "noaux_tc", | |
| "transformers_version": "5.3.0.dev0", | |
| "use_cache": true, | |
| "vocab_size": 129280 | |
| } | |