Instructions to use LnL-AI/dbrx-base-converted-v2-4bit-gptq-marlin with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use LnL-AI/dbrx-base-converted-v2-4bit-gptq-marlin with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="LnL-AI/dbrx-base-converted-v2-4bit-gptq-marlin", trust_remote_code=True)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("LnL-AI/dbrx-base-converted-v2-4bit-gptq-marlin", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("LnL-AI/dbrx-base-converted-v2-4bit-gptq-marlin", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use LnL-AI/dbrx-base-converted-v2-4bit-gptq-marlin with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "LnL-AI/dbrx-base-converted-v2-4bit-gptq-marlin" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "LnL-AI/dbrx-base-converted-v2-4bit-gptq-marlin", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/LnL-AI/dbrx-base-converted-v2-4bit-gptq-marlin
- SGLang
How to use LnL-AI/dbrx-base-converted-v2-4bit-gptq-marlin 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 "LnL-AI/dbrx-base-converted-v2-4bit-gptq-marlin" \ --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": "LnL-AI/dbrx-base-converted-v2-4bit-gptq-marlin", "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 "LnL-AI/dbrx-base-converted-v2-4bit-gptq-marlin" \ --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": "LnL-AI/dbrx-base-converted-v2-4bit-gptq-marlin", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use LnL-AI/dbrx-base-converted-v2-4bit-gptq-marlin with Docker Model Runner:
docker model run hf.co/LnL-AI/dbrx-base-converted-v2-4bit-gptq-marlin
Upload config.json with huggingface_hub
Browse files- config.json +52 -0
config.json
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_name_or_path": "/monster/data/model/dbrx-base-converted-v2/",
|
| 3 |
+
"architectures": [
|
| 4 |
+
"DbrxForCausalLM"
|
| 5 |
+
],
|
| 6 |
+
"attn_config": {
|
| 7 |
+
"clip_qkv": 8,
|
| 8 |
+
"kv_n_heads": 8,
|
| 9 |
+
"model_type": "",
|
| 10 |
+
"rope_theta": 500000
|
| 11 |
+
},
|
| 12 |
+
"auto_map": {
|
| 13 |
+
"AutoConfig": "configuration_dbrx.DbrxConfig",
|
| 14 |
+
"AutoModelForCausalLM": "modeling_dbrx.DbrxForCausalLM"
|
| 15 |
+
},
|
| 16 |
+
"d_model": 6144,
|
| 17 |
+
"emb_pdrop": 0.0,
|
| 18 |
+
"ffn_config": {
|
| 19 |
+
"ffn_hidden_size": 10752,
|
| 20 |
+
"model_type": "",
|
| 21 |
+
"moe_jitter_eps": 0.01,
|
| 22 |
+
"moe_loss_weight": 0.05,
|
| 23 |
+
"moe_num_experts": 16,
|
| 24 |
+
"moe_top_k": 4
|
| 25 |
+
},
|
| 26 |
+
"initializer_range": 0.02,
|
| 27 |
+
"max_seq_len": 32768,
|
| 28 |
+
"model_type": "dbrx",
|
| 29 |
+
"n_heads": 48,
|
| 30 |
+
"n_layers": 40,
|
| 31 |
+
"output_router_logits": false,
|
| 32 |
+
"quantization_config": {
|
| 33 |
+
"bits": 4,
|
| 34 |
+
"checkpoint_format": "marlin",
|
| 35 |
+
"damp_percent": 0.005,
|
| 36 |
+
"desc_act": false,
|
| 37 |
+
"group_size": 128,
|
| 38 |
+
"model_file_base_name": null,
|
| 39 |
+
"model_name_or_path": null,
|
| 40 |
+
"quant_method": "gptq",
|
| 41 |
+
"static_groups": false,
|
| 42 |
+
"sym": true,
|
| 43 |
+
"true_sequential": true
|
| 44 |
+
},
|
| 45 |
+
"resid_pdrop": 0.0,
|
| 46 |
+
"router_aux_loss_coef": 0.05,
|
| 47 |
+
"tie_word_embeddings": false,
|
| 48 |
+
"torch_dtype": "float16",
|
| 49 |
+
"transformers_version": "4.38.2",
|
| 50 |
+
"use_cache": true,
|
| 51 |
+
"vocab_size": 100352
|
| 52 |
+
}
|