Instructions to use TheBlokeAI/Mixtral-tiny-GPTQ with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use TheBlokeAI/Mixtral-tiny-GPTQ with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="TheBlokeAI/Mixtral-tiny-GPTQ")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("TheBlokeAI/Mixtral-tiny-GPTQ") model = AutoModelForCausalLM.from_pretrained("TheBlokeAI/Mixtral-tiny-GPTQ", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use TheBlokeAI/Mixtral-tiny-GPTQ with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "TheBlokeAI/Mixtral-tiny-GPTQ" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "TheBlokeAI/Mixtral-tiny-GPTQ", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/TheBlokeAI/Mixtral-tiny-GPTQ
- SGLang
How to use TheBlokeAI/Mixtral-tiny-GPTQ 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 "TheBlokeAI/Mixtral-tiny-GPTQ" \ --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": "TheBlokeAI/Mixtral-tiny-GPTQ", "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 "TheBlokeAI/Mixtral-tiny-GPTQ" \ --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": "TheBlokeAI/Mixtral-tiny-GPTQ", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use TheBlokeAI/Mixtral-tiny-GPTQ with Docker Model Runner:
docker model run hf.co/TheBlokeAI/Mixtral-tiny-GPTQ
GPTQ model commit
Browse files- config.json +12 -25
- model.safetensors +2 -2
- quantize_config.json +8 -14
config.json
CHANGED
|
@@ -20,30 +20,6 @@
|
|
| 20 |
"output_router_logits": false,
|
| 21 |
"pad_token_id": 0,
|
| 22 |
"pretraining_tp": 1,
|
| 23 |
-
"quantization_config": {
|
| 24 |
-
"batch_size": 1,
|
| 25 |
-
"bits": 4,
|
| 26 |
-
"block_name_to_quantize": "model.layers",
|
| 27 |
-
"cache_block_outputs": true,
|
| 28 |
-
"damp_percent": 0.1,
|
| 29 |
-
"desc_act": true,
|
| 30 |
-
"exllama_config": {
|
| 31 |
-
"version": 1
|
| 32 |
-
},
|
| 33 |
-
"group_size": 128,
|
| 34 |
-
"max_input_length": null,
|
| 35 |
-
"model_seqlen": 8192,
|
| 36 |
-
"module_name_preceding_first_block": [
|
| 37 |
-
"model.embed_tokens"
|
| 38 |
-
],
|
| 39 |
-
"pad_token_id": null,
|
| 40 |
-
"quant_method": "gptq",
|
| 41 |
-
"sym": true,
|
| 42 |
-
"tokenizer": null,
|
| 43 |
-
"true_sequential": true,
|
| 44 |
-
"use_cuda_fp16": true,
|
| 45 |
-
"use_exllama": true
|
| 46 |
-
},
|
| 47 |
"rms_norm_eps": 1e-05,
|
| 48 |
"rope_theta": 10000.0,
|
| 49 |
"router_aux_loss_coef": 0.001,
|
|
@@ -52,5 +28,16 @@
|
|
| 52 |
"torch_dtype": "float16",
|
| 53 |
"transformers_version": "4.36.0.dev0",
|
| 54 |
"use_cache": true,
|
| 55 |
-
"vocab_size": 32000
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 56 |
}
|
|
|
|
| 20 |
"output_router_logits": false,
|
| 21 |
"pad_token_id": 0,
|
| 22 |
"pretraining_tp": 1,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
"rms_norm_eps": 1e-05,
|
| 24 |
"rope_theta": 10000.0,
|
| 25 |
"router_aux_loss_coef": 0.001,
|
|
|
|
| 28 |
"torch_dtype": "float16",
|
| 29 |
"transformers_version": "4.36.0.dev0",
|
| 30 |
"use_cache": true,
|
| 31 |
+
"vocab_size": 32000,
|
| 32 |
+
"quantization_config": {
|
| 33 |
+
"bits": 4,
|
| 34 |
+
"group_size": 128,
|
| 35 |
+
"damp_percent": 0.1,
|
| 36 |
+
"desc_act": true,
|
| 37 |
+
"sym": true,
|
| 38 |
+
"true_sequential": true,
|
| 39 |
+
"model_name_or_path": null,
|
| 40 |
+
"model_file_base_name": "model",
|
| 41 |
+
"quant_method": "gptq"
|
| 42 |
+
}
|
| 43 |
}
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b407869971afeac96a2f915a7a1762923f47cf6212c38a5ff5f57590f9aa7395
|
| 3 |
+
size 226060152
|
quantize_config.json
CHANGED
|
@@ -1,16 +1,10 @@
|
|
| 1 |
{
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
],
|
| 11 |
-
"desc_act": [
|
| 12 |
-
true
|
| 13 |
-
],
|
| 14 |
-
"sym": true,
|
| 15 |
-
"true_sequential": true
|
| 16 |
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"bits": 4,
|
| 3 |
+
"group_size": 128,
|
| 4 |
+
"damp_percent": 0.1,
|
| 5 |
+
"desc_act": true,
|
| 6 |
+
"sym": true,
|
| 7 |
+
"true_sequential": true,
|
| 8 |
+
"model_name_or_path": null,
|
| 9 |
+
"model_file_base_name": "model"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
}
|