Instructions to use Locutusque/Hercules-3.0-Mistral-7B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Locutusque/Hercules-3.0-Mistral-7B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Locutusque/Hercules-3.0-Mistral-7B")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Locutusque/Hercules-3.0-Mistral-7B") model = AutoModelForCausalLM.from_pretrained("Locutusque/Hercules-3.0-Mistral-7B", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Locutusque/Hercules-3.0-Mistral-7B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Locutusque/Hercules-3.0-Mistral-7B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Locutusque/Hercules-3.0-Mistral-7B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Locutusque/Hercules-3.0-Mistral-7B
- SGLang
How to use Locutusque/Hercules-3.0-Mistral-7B 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 "Locutusque/Hercules-3.0-Mistral-7B" \ --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": "Locutusque/Hercules-3.0-Mistral-7B", "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 "Locutusque/Hercules-3.0-Mistral-7B" \ --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": "Locutusque/Hercules-3.0-Mistral-7B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Locutusque/Hercules-3.0-Mistral-7B with Docker Model Runner:
docker model run hf.co/Locutusque/Hercules-3.0-Mistral-7B
Commit History
-
Update README.md
Verified signature304f46c -
Add exllamav2 quant link (#5)
Verified signature- Add exllamav2 quant link (cdec4919e0aabf8f00f75485f81583c7470140f8) Co-authored-by: Bartowski <bartowski@users.noreply.huggingface.co>33d8144
-
Update README.md
Verified signaturee9ab8a2 -
Update README.md
Verified signature2e01282 -
Update README.md
Verified signature7c0a04b -
Update README.md
Verified signaturee1163d7 -
Upload MistralForCausalLM (#4)
Verified signature- Upload MistralForCausalLM (51fc629e7cccdddcf71bef74a66efe059e6e23b4)1ee443a -
Upload tokenizer
Verified signature19ca4bf
-
Upload MistralForCausalLM (#3)
Verified signature- Upload MistralForCausalLM (48043c2283d274cc481eff40a77235be0834b16c)13d1b8c -
Upload tokenizer
Verified signature6b66a75 -
Upload MistralForCausalLM (#2)
Verified signature- Upload MistralForCausalLM (3eb1cc25b7c6b8750cac8b414316c4a77bfc4640)2cee5d5 -
Upload tokenizer
Verified signatureb6045f5 -
Upload MistralForCausalLM (#1)
Verified signature- Upload MistralForCausalLM (3d44eaba54a2e41277d84217ab1124861bbd4a65)939c83f -
Upload tokenizer
Verified signatureb756dfb -
initial commit
Verified signature93367b5