Instructions to use bartowski/Meta-Llama-3-8B-Instruct-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use bartowski/Meta-Llama-3-8B-Instruct-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="bartowski/Meta-Llama-3-8B-Instruct-GGUF", filename="Meta-Llama-3-8B-Instruct-IQ1_M.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use bartowski/Meta-Llama-3-8B-Instruct-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 bartowski/Meta-Llama-3-8B-Instruct-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf bartowski/Meta-Llama-3-8B-Instruct-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 bartowski/Meta-Llama-3-8B-Instruct-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf bartowski/Meta-Llama-3-8B-Instruct-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 bartowski/Meta-Llama-3-8B-Instruct-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf bartowski/Meta-Llama-3-8B-Instruct-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 bartowski/Meta-Llama-3-8B-Instruct-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf bartowski/Meta-Llama-3-8B-Instruct-GGUF:Q4_K_M
Use Docker
docker model run hf.co/bartowski/Meta-Llama-3-8B-Instruct-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use bartowski/Meta-Llama-3-8B-Instruct-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "bartowski/Meta-Llama-3-8B-Instruct-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "bartowski/Meta-Llama-3-8B-Instruct-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/bartowski/Meta-Llama-3-8B-Instruct-GGUF:Q4_K_M
- Ollama
How to use bartowski/Meta-Llama-3-8B-Instruct-GGUF with Ollama:
ollama run hf.co/bartowski/Meta-Llama-3-8B-Instruct-GGUF:Q4_K_M
- Unsloth Studio
How to use bartowski/Meta-Llama-3-8B-Instruct-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 bartowski/Meta-Llama-3-8B-Instruct-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 bartowski/Meta-Llama-3-8B-Instruct-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for bartowski/Meta-Llama-3-8B-Instruct-GGUF to start chatting
- Atomic Chat new
- Docker Model Runner
How to use bartowski/Meta-Llama-3-8B-Instruct-GGUF with Docker Model Runner:
docker model run hf.co/bartowski/Meta-Llama-3-8B-Instruct-GGUF:Q4_K_M
- Lemonade
How to use bartowski/Meta-Llama-3-8B-Instruct-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull bartowski/Meta-Llama-3-8B-Instruct-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.Meta-Llama-3-8B-Instruct-GGUF-Q4_K_M
List all available models
lemonade list
Anyone experiences quality degrade for math question?
Below is generated by Q6_K quant verision, I wonder the degrade comes from quant or the pre-tokenization issue found recently?
<|begin_of_text|>
what is 3333+777?
The answer is: 11110
Explanation:
The problem is asking for the sum of 3333 and 777.
To solve this, we can simply add the two numbers together:
3333 + 777 = 11110
So the answer is indeed 11110.<|eot_id|>
Might be related to some tokenization issues that still exist, that will hopefully be solved only with updates to inference engines and not by being requantized
Reference:
https://github.com/ggerganov/llama.cpp/issues/7062#issuecomment-2096818852
OK thanks, will wait for updates from the community.
Update: I found if I use the proper chat template, even the earlier Q8 version (with degrade warning) can also do the math problem right. I doubt the regex fix in pretokenization is really needed.
<|begin_of_text|><|begin_of_text|><|start_header_id|>system<|end_header_id|>\n\nYou are a helpful, smart, kind, and efficient AI assistant. You always fulfill the user's requests to the best of your ability.<|eot_id|>\n<|start_header_id|>user<|end_header_id|>\n\nWhat is 3333+777?<|eot_id|>\n<|start_header_id|>assistant<|end_header_id|>\n\nI'd be happy to help you with that!
The answer to 3333 + 777 is 4110.<|eot_id|> [end of text]