Instructions to use QuantFactory/Llama-3-Hercules-5.0-8B-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use QuantFactory/Llama-3-Hercules-5.0-8B-GGUF with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="QuantFactory/Llama-3-Hercules-5.0-8B-GGUF")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("QuantFactory/Llama-3-Hercules-5.0-8B-GGUF", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use QuantFactory/Llama-3-Hercules-5.0-8B-GGUF with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf QuantFactory/Llama-3-Hercules-5.0-8B-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf QuantFactory/Llama-3-Hercules-5.0-8B-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf QuantFactory/Llama-3-Hercules-5.0-8B-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf QuantFactory/Llama-3-Hercules-5.0-8B-GGUF:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf QuantFactory/Llama-3-Hercules-5.0-8B-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf QuantFactory/Llama-3-Hercules-5.0-8B-GGUF:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf QuantFactory/Llama-3-Hercules-5.0-8B-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf QuantFactory/Llama-3-Hercules-5.0-8B-GGUF:Q4_K_M
Use Docker
docker model run hf.co/QuantFactory/Llama-3-Hercules-5.0-8B-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use QuantFactory/Llama-3-Hercules-5.0-8B-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "QuantFactory/Llama-3-Hercules-5.0-8B-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "QuantFactory/Llama-3-Hercules-5.0-8B-GGUF", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/QuantFactory/Llama-3-Hercules-5.0-8B-GGUF:Q4_K_M
- SGLang
How to use QuantFactory/Llama-3-Hercules-5.0-8B-GGUF 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 "QuantFactory/Llama-3-Hercules-5.0-8B-GGUF" \ --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": "QuantFactory/Llama-3-Hercules-5.0-8B-GGUF", "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 "QuantFactory/Llama-3-Hercules-5.0-8B-GGUF" \ --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": "QuantFactory/Llama-3-Hercules-5.0-8B-GGUF", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Ollama
How to use QuantFactory/Llama-3-Hercules-5.0-8B-GGUF with Ollama:
ollama run hf.co/QuantFactory/Llama-3-Hercules-5.0-8B-GGUF:Q4_K_M
- Unsloth Studio
How to use QuantFactory/Llama-3-Hercules-5.0-8B-GGUF with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for QuantFactory/Llama-3-Hercules-5.0-8B-GGUF to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for QuantFactory/Llama-3-Hercules-5.0-8B-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for QuantFactory/Llama-3-Hercules-5.0-8B-GGUF to start chatting
- Docker Model Runner
How to use QuantFactory/Llama-3-Hercules-5.0-8B-GGUF with Docker Model Runner:
docker model run hf.co/QuantFactory/Llama-3-Hercules-5.0-8B-GGUF:Q4_K_M
- Lemonade
How to use QuantFactory/Llama-3-Hercules-5.0-8B-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull QuantFactory/Llama-3-Hercules-5.0-8B-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.Llama-3-Hercules-5.0-8B-GGUF-Q4_K_M
List all available models
lemonade list
- Atomic Chat
Llama-3-Hercules-5.0-8B-GGUF
This is quantized version of Locutusque/Llama-3-Hercules-5.0-8B created using llama.cpp
Model Description
Llama-3-Hercules-5.0-8B is a fine-tuned language model derived from Llama-3-8B. It is specifically designed to excel in instruction following, function calls, and conversational interactions across various scientific and technical domains. This fine-tuning has hercules-v5.0 with enhanced abilities in:
- Complex Instruction Following: Understanding and accurately executing multi-step instructions, even those involving specialized terminology.
- Function Calling: Seamlessly interpreting and executing function calls, providing appropriate input and output values.
- Domain-Specific Knowledge: Engaging in informative and educational conversations about Biology, Chemistry, Physics, Mathematics, Medicine, Computer Science, and more.
Intended Uses & Potential Bias
Llama-3-Hercules-5.0-8B is well-suited to the following applications:
- Specialized Chatbots: Creating knowledgeable chatbots and conversational agents in scientific and technical fields.
- Instructional Assistants: Supporting users with educational and step-by-step guidance in various disciplines.
- Code Generation and Execution: Facilitating code execution through function calls, aiding in software development and prototyping.
Important Note: Although Hercules-v5.0 is carefully constructed, it's important to be aware that the underlying data sources may contain biases or reflect harmful stereotypes. Use this model with caution and consider additional measures to mitigate potential biases in its responses.
Limitations and Risks
- Toxicity: The dataset contains toxic or harmful examples.
- Hallucinations and Factual Errors: Like other language models, Llama-3-Hercules-5.0-8B may generate incorrect or misleading information, especially in specialized domains where it lacks sufficient expertise.
- Potential for Misuse: The ability to engage in technical conversations and execute function calls could be misused for malicious purposes.
Training Procedure
- This model was trained on 8 kaggle TPUs, using torch xla SPMD for high MXU efficiency. There was no expense on my end (meaning you can reproduce this too!)
- A learning rate of 2e-5 with the Adam optimizer. A linear scheduler was used, with an end factor of 0.005.
- No mixed precision was used, with the default dtype being bfloat16.
- A total batch size of 128 was used.
- Trained on all examples of Hercules-v5.0 for 2 epochs
- No model parameters were frozen and no quantization was used.
- 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>
This model was fine-tuned using my TPU-Alignment repository. https://github.com/Locutusque/TPU-Alignment
- Downloads last month
- 278
2-bit
3-bit
4-bit
5-bit
6-bit
8-bit
Model tree for QuantFactory/Llama-3-Hercules-5.0-8B-GGUF
Base model
Locutusque/Llama-3-Hercules-5.0-8B