Instructions to use artek0chumak/TestMixtral with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use artek0chumak/TestMixtral with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="artek0chumak/TestMixtral")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("artek0chumak/TestMixtral") model = AutoModelForCausalLM.from_pretrained("artek0chumak/TestMixtral") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use artek0chumak/TestMixtral with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "artek0chumak/TestMixtral" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "artek0chumak/TestMixtral", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/artek0chumak/TestMixtral
- SGLang
How to use artek0chumak/TestMixtral 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 "artek0chumak/TestMixtral" \ --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": "artek0chumak/TestMixtral", "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 "artek0chumak/TestMixtral" \ --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": "artek0chumak/TestMixtral", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use artek0chumak/TestMixtral with Docker Model Runner:
docker model run hf.co/artek0chumak/TestMixtral
change config
Browse files- config.json +4 -4
- generation_config.json +1 -1
- model.safetensors +2 -2
config.json
CHANGED
|
@@ -12,10 +12,10 @@
|
|
| 12 |
"intermediate_size": 256,
|
| 13 |
"max_position_embeddings": 32768,
|
| 14 |
"model_type": "mixtral",
|
| 15 |
-
"num_attention_heads":
|
| 16 |
"num_experts_per_tok": 4,
|
| 17 |
"num_hidden_layers": 12,
|
| 18 |
-
"num_key_value_heads":
|
| 19 |
"num_local_experts": 4,
|
| 20 |
"output_router_logits": false,
|
| 21 |
"rms_norm_eps": 1e-06,
|
|
@@ -23,8 +23,8 @@
|
|
| 23 |
"router_aux_loss_coef": 0.001,
|
| 24 |
"sliding_window": null,
|
| 25 |
"tie_word_embeddings": false,
|
| 26 |
-
"torch_dtype": "
|
| 27 |
-
"transformers_version": "4.
|
| 28 |
"use_cache": true,
|
| 29 |
"vocab_size": 32005
|
| 30 |
}
|
|
|
|
| 12 |
"intermediate_size": 256,
|
| 13 |
"max_position_embeddings": 32768,
|
| 14 |
"model_type": "mixtral",
|
| 15 |
+
"num_attention_heads": 2,
|
| 16 |
"num_experts_per_tok": 4,
|
| 17 |
"num_hidden_layers": 12,
|
| 18 |
+
"num_key_value_heads": 1,
|
| 19 |
"num_local_experts": 4,
|
| 20 |
"output_router_logits": false,
|
| 21 |
"rms_norm_eps": 1e-06,
|
|
|
|
| 23 |
"router_aux_loss_coef": 0.001,
|
| 24 |
"sliding_window": null,
|
| 25 |
"tie_word_embeddings": false,
|
| 26 |
+
"torch_dtype": "float32",
|
| 27 |
+
"transformers_version": "4.38.2",
|
| 28 |
"use_cache": true,
|
| 29 |
"vocab_size": 32005
|
| 30 |
}
|
generation_config.json
CHANGED
|
@@ -2,5 +2,5 @@
|
|
| 2 |
"_from_model_config": true,
|
| 3 |
"bos_token_id": 1,
|
| 4 |
"eos_token_id": 2,
|
| 5 |
-
"transformers_version": "4.
|
| 6 |
}
|
|
|
|
| 2 |
"_from_model_config": true,
|
| 3 |
"bos_token_id": 1,
|
| 4 |
"eos_token_id": 2,
|
| 5 |
+
"transformers_version": "4.38.2"
|
| 6 |
}
|
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:3e68fe9d7fd1316bb75d8ddd3450a9deaec8d3ef684e84c55517fd26b9848a83
|
| 3 |
+
size 26459296
|