Text Generation
Transformers
Safetensors
mistral
gptq
4bit
int4
gptqmodel
modelcloud
instruct
conversational
text-generation-inference
4-bit precision
Instructions to use ModelCloud/Mistral-Large-Instruct-2407-gptq-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ModelCloud/Mistral-Large-Instruct-2407-gptq-4bit with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ModelCloud/Mistral-Large-Instruct-2407-gptq-4bit") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("ModelCloud/Mistral-Large-Instruct-2407-gptq-4bit") model = AutoModelForCausalLM.from_pretrained("ModelCloud/Mistral-Large-Instruct-2407-gptq-4bit", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ModelCloud/Mistral-Large-Instruct-2407-gptq-4bit with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ModelCloud/Mistral-Large-Instruct-2407-gptq-4bit" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ModelCloud/Mistral-Large-Instruct-2407-gptq-4bit", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ModelCloud/Mistral-Large-Instruct-2407-gptq-4bit
- SGLang
How to use ModelCloud/Mistral-Large-Instruct-2407-gptq-4bit 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 "ModelCloud/Mistral-Large-Instruct-2407-gptq-4bit" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ModelCloud/Mistral-Large-Instruct-2407-gptq-4bit", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "ModelCloud/Mistral-Large-Instruct-2407-gptq-4bit" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ModelCloud/Mistral-Large-Instruct-2407-gptq-4bit", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use ModelCloud/Mistral-Large-Instruct-2407-gptq-4bit with Docker Model Runner:
docker model run hf.co/ModelCloud/Mistral-Large-Instruct-2407-gptq-4bit
Commit History
-
Upload folder using huggingface_hub (#1)
Verified signature- 2b0c629c76b40e4b57267946bf9691512a0ba7cc1176e89a5962b1c5ece911e3 (9b2c8889e4d0c5ce31b8204bc2b4efa881b40ad2) - 19283fc534dfe84738eb2add1d7f1cb473f62eae50b58e547148cdd5c2a1ceb3 (85f3a6c5a7c96d73fb3d51b4253be95d459182e3) - 250eefe959066819150e07ae8c2cae373512c5d759887deca8349351c72375b9 (f2f90d9438ae4bdcc13684921455da4cf96d0805) - 5373a5e18d2cf834210660d96283cee30b7fbb758a6f4a14d44cc20766cd7b5c (ff0ce95132dec9555f4776fdb5bfbc26738942ea) - c37ae9c15e7a5f75f0e0c0435749bb51d3c8c963a3ed195f108e87dc95cfeaca (ad22d30d4eff0974ea01583e4791065dc60c2f8e) - cc4b9176db76475edb0b0bd09290acc0fb474aaff59a1094e4c6ea2434ea4884 (fd33d49e6f9d2f21172309c43d1eed5a95397b11) - 7282b73d4e69bd7c4e0a417149bc0921df9e002771b87f2e34cc82644d4f9f85 (187d82ec0e9bdae66dba521ad4a27b6ce881a395) - 3c0ce0d8f5b681b0248a8031b813a78941a0b83f4843d443da7204a9ec35e194 (47b260cde645bdcb9eeb5750b53edf7be29b2706) - 059dd1e73c20ac73189c52c84efeecf4c94460754049e31d64271bb45b8a4587 (4d9deeb9867c88cd17199f7bbea7fa2ef0e1559f)0c34e27