Text Generation
Transformers
Safetensors
mistral
chemistry
biology
code
medical
Not-For-All-Audiences
Eval Results (legacy)
text-generation-inference
Instructions to use Locutusque/Hercules-3.1-Mistral-7B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Locutusque/Hercules-3.1-Mistral-7B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Locutusque/Hercules-3.1-Mistral-7B")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Locutusque/Hercules-3.1-Mistral-7B") model = AutoModelForCausalLM.from_pretrained("Locutusque/Hercules-3.1-Mistral-7B", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Locutusque/Hercules-3.1-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.1-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.1-Mistral-7B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Locutusque/Hercules-3.1-Mistral-7B
- SGLang
How to use Locutusque/Hercules-3.1-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.1-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.1-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.1-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.1-Mistral-7B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Locutusque/Hercules-3.1-Mistral-7B with Docker Model Runner:
docker model run hf.co/Locutusque/Hercules-3.1-Mistral-7B
Add ExLlamaV2 quant link (#2)
Browse files- Add ExLlamaV2 quant link (b6758f74b312c71635861c52b0df7d534af6e30a)
Co-authored-by: Bartowski <bartowski@users.noreply.huggingface.co>
README.md
CHANGED
|
@@ -78,4 +78,8 @@ The bluemoon dataset was filtered from the training data as it showed to cause p
|
|
| 78 |
- No model parameters were frozen.
|
| 79 |
- 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>```
|
| 80 |
|
| 81 |
-
This model was fine-tuned using the TPU-Alignment repository. https://github.com/Locutusque/TPU-Alignment
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 78 |
- No model parameters were frozen.
|
| 79 |
- 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>```
|
| 80 |
|
| 81 |
+
This model was fine-tuned using the TPU-Alignment repository. https://github.com/Locutusque/TPU-Alignment
|
| 82 |
+
|
| 83 |
+
# Quants
|
| 84 |
+
|
| 85 |
+
ExLlamaV2 by bartowski https://huggingface.co/bartowski/Hercules-3.1-Mistral-7B-exl2
|