Text Generation
Transformers
Safetensors
PyTorch
Indonesian
deeplm
bitnet
Mixture of Experts
mla
mtp
indonesian
Instructions to use samcheng0/deeplm-108m with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use samcheng0/deeplm-108m with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="samcheng0/deeplm-108m")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("samcheng0/deeplm-108m", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use samcheng0/deeplm-108m with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "samcheng0/deeplm-108m" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "samcheng0/deeplm-108m", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/samcheng0/deeplm-108m
- SGLang
How to use samcheng0/deeplm-108m 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 "samcheng0/deeplm-108m" \ --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": "samcheng0/deeplm-108m", "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 "samcheng0/deeplm-108m" \ --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": "samcheng0/deeplm-108m", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use samcheng0/deeplm-108m with Docker Model Runner:
docker model run hf.co/samcheng0/deeplm-108m
Upload config.json with huggingface_hub
Browse files- config.json +29 -0
config.json
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"DeeplmModel"
|
| 4 |
+
],
|
| 5 |
+
"model_type": "deeplm",
|
| 6 |
+
"vocab_size": 32000,
|
| 7 |
+
"hidden_size": 512,
|
| 8 |
+
"intermediate_size": 2048,
|
| 9 |
+
"num_hidden_layers": 10,
|
| 10 |
+
"num_attention_heads": 8,
|
| 11 |
+
"num_key_value_heads": 1,
|
| 12 |
+
"max_position_embeddings": 4096,
|
| 13 |
+
"rms_norm_eps": 1e-06,
|
| 14 |
+
"rope_theta": 50000.0,
|
| 15 |
+
"rope_dim": 64,
|
| 16 |
+
"tie_word_embeddings": true,
|
| 17 |
+
"num_routed_experts": 4,
|
| 18 |
+
"num_shared_experts": 1,
|
| 19 |
+
"expert_topk": 2,
|
| 20 |
+
"q_lora_rank": 192,
|
| 21 |
+
"kv_lora_rank": 64,
|
| 22 |
+
"qk_rope_head_dim": 64,
|
| 23 |
+
"qk_nope_head_dim": 64,
|
| 24 |
+
"v_head_dim": 128,
|
| 25 |
+
"mtp_depth": 2,
|
| 26 |
+
"mtp_num_layers": 2,
|
| 27 |
+
"bitnet_quantized": true,
|
| 28 |
+
"bitnet_scale": "absmean"
|
| 29 |
+
}
|