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")# 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
Add exllamav2 quant link
#5
by bartowski - opened
README.md
CHANGED
|
@@ -71,4 +71,8 @@ Hercules-3.0-Mistral-7B is fine-tuned from the following sources:
|
|
| 71 |
- No model parameters were frozen.
|
| 72 |
- This model was trained on OpenAI's ChatML prompt format. Because this model has function calling capabilities, the prompt format is slightly different, here's what it would look like: ```<|im_start|>system\n{message}<|im_end|>\n<|im_start|>user\n{user message}<|im_end|>\n<|im_start|>call\n{function call message}<|im_end|>\n<|im_start|>function\n{function response message}<|im_end|>\n<|im_start|>assistant\n{assistant message}</s>```
|
| 73 |
|
| 74 |
-
This model was fine-tuned using the TPU-Alignment repository. https://github.com/Locutusque/TPU-Alignment
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 71 |
- No model parameters were frozen.
|
| 72 |
- This model was trained on OpenAI's ChatML prompt format. Because this model has function calling capabilities, the prompt format is slightly different, here's what it would look like: ```<|im_start|>system\n{message}<|im_end|>\n<|im_start|>user\n{user message}<|im_end|>\n<|im_start|>call\n{function call message}<|im_end|>\n<|im_start|>function\n{function response message}<|im_end|>\n<|im_start|>assistant\n{assistant message}</s>```
|
| 73 |
|
| 74 |
+
This model was fine-tuned using the TPU-Alignment repository. https://github.com/Locutusque/TPU-Alignment
|
| 75 |
+
|
| 76 |
+
# Quants
|
| 77 |
+
|
| 78 |
+
ExLlamaV2 by bartowski https://huggingface.co/bartowski/Hercules-3.0-Mistral-7B-exl2
|