Instructions to use mattshumer/mistral-8x7b-chat with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mattshumer/mistral-8x7b-chat with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="mattshumer/mistral-8x7b-chat", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("mattshumer/mistral-8x7b-chat", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("mattshumer/mistral-8x7b-chat", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use mattshumer/mistral-8x7b-chat with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "mattshumer/mistral-8x7b-chat" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mattshumer/mistral-8x7b-chat", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/mattshumer/mistral-8x7b-chat
- SGLang
How to use mattshumer/mistral-8x7b-chat 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 "mattshumer/mistral-8x7b-chat" \ --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": "mattshumer/mistral-8x7b-chat", "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 "mattshumer/mistral-8x7b-chat" \ --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": "mattshumer/mistral-8x7b-chat", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use mattshumer/mistral-8x7b-chat with Docker Model Runner:
docker model run hf.co/mattshumer/mistral-8x7b-chat
Commit History
-
Upload folder using huggingface_hub (#1)
- 0942c75e6e083bbc42c5cf919ed98f3a838ae8b27e531ce4f5effacc0f328d37 (35fc73af6bb911c8dc31eb2e0f9da77ccce9c899) - 3ed429526aab0696ec505a9aeaa1b7f2ff61c31a6df2324471de7843607f5012 (9165203b1bb937c59be74b1f95bea23015919181) - 935c74df61804daf7b313f1b015e63a2e9cf57f8423ca134eca9e0d4e34bb4d8 (9defb9e9ecc6c2af96236f0a85ec7df8d89c24da) - e99b8a3f67c745a7a48e1b3d3919e6af2d7c4e811b82710c3827413d84c99b24 (255a4c8d56713048f951d736e378a9b4fb84a523) - 4929f30c6a890380cb30446a8df54ddcf7924d9349e6d3fc722fdf205cf9f333 (bfb007e0f3e51275bb07ef8da920949bec65952c) - 1245b8e47f6a32e4a898c1c73db1c083aafc28459fcc9d874fac13e57fc638f4 (23f58aebe67f0c29f94bde586cda056f11209200) - b0ccd2922d120c8bc74c0338de55c7369bca150d863adfedecdad0b37392c816 (5dc42462395cf3af8a18ac582168e613f4b83151) - a72f53df0d8d7784afcfec1b8ed3836786bd4cdae748ebedb776270942a2283a (efd8bcc1113710bab14c1f0be6ddfe09cba6a816) - bb69e9ec6a811ef0729dc5d85e3fd78e14bcdc86d5c3d82d85c3d512eb297bf7 (a6fa55b12d03a113ae46dab0ea3104cfa4a2e1ca) - e1d291d0…fe94c77 -
Delete tokenizer.model
2d21540 -
Upload tokenizer
d6f174f