Instructions to use QuantFactory/Meta-Llama-3-8B-Instruct-GGUF-v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use QuantFactory/Meta-Llama-3-8B-Instruct-GGUF-v2 with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="QuantFactory/Meta-Llama-3-8B-Instruct-GGUF-v2", filename="Meta-Llama-3-8B-Instruct-v2.Q2_K.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 QuantFactory/Meta-Llama-3-8B-Instruct-GGUF-v2 with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf QuantFactory/Meta-Llama-3-8B-Instruct-GGUF-v2:Q4_K_M # Run inference directly in the terminal: llama-cli -hf QuantFactory/Meta-Llama-3-8B-Instruct-GGUF-v2:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf QuantFactory/Meta-Llama-3-8B-Instruct-GGUF-v2:Q4_K_M # Run inference directly in the terminal: llama-cli -hf QuantFactory/Meta-Llama-3-8B-Instruct-GGUF-v2: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/Meta-Llama-3-8B-Instruct-GGUF-v2:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf QuantFactory/Meta-Llama-3-8B-Instruct-GGUF-v2: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/Meta-Llama-3-8B-Instruct-GGUF-v2:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf QuantFactory/Meta-Llama-3-8B-Instruct-GGUF-v2:Q4_K_M
Use Docker
docker model run hf.co/QuantFactory/Meta-Llama-3-8B-Instruct-GGUF-v2:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use QuantFactory/Meta-Llama-3-8B-Instruct-GGUF-v2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "QuantFactory/Meta-Llama-3-8B-Instruct-GGUF-v2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "QuantFactory/Meta-Llama-3-8B-Instruct-GGUF-v2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/QuantFactory/Meta-Llama-3-8B-Instruct-GGUF-v2:Q4_K_M
- Ollama
How to use QuantFactory/Meta-Llama-3-8B-Instruct-GGUF-v2 with Ollama:
ollama run hf.co/QuantFactory/Meta-Llama-3-8B-Instruct-GGUF-v2:Q4_K_M
- Unsloth Studio
How to use QuantFactory/Meta-Llama-3-8B-Instruct-GGUF-v2 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/Meta-Llama-3-8B-Instruct-GGUF-v2 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/Meta-Llama-3-8B-Instruct-GGUF-v2 to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for QuantFactory/Meta-Llama-3-8B-Instruct-GGUF-v2 to start chatting
- Docker Model Runner
How to use QuantFactory/Meta-Llama-3-8B-Instruct-GGUF-v2 with Docker Model Runner:
docker model run hf.co/QuantFactory/Meta-Llama-3-8B-Instruct-GGUF-v2:Q4_K_M
- Lemonade
How to use QuantFactory/Meta-Llama-3-8B-Instruct-GGUF-v2 with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull QuantFactory/Meta-Llama-3-8B-Instruct-GGUF-v2:Q4_K_M
Run and chat with the model
lemonade run user.Meta-Llama-3-8B-Instruct-GGUF-v2-Q4_K_M
List all available models
lemonade list
I'm experiencing the same endless loop with this version as well
When I'm using the model with Llama server, I'm experiencing the same issue:
alex@M1 llama.cpp % curl --request POST
--url http://localhost:8080/completion
--header "Content-Type: application/json"
--data '{"prompt": "<|start_header_id|>system<|end_header_id|>\n\nYou are a helpful assistant<|eot_id|><|start_header_id|>user<|end_header_id|>\n\nHello<|eot_id|><|start_header_id|>assistant<|end_header_id|>\n\nHi there<|eot_id|><|start_header_id|>user<|end_header_id|>\n\nWrite me a detailed markdown article in Dutch on a subject: 2 Zodiac Signs Experience Abundance On May 18, During Sun Conjunct Jupiter<|eot_id|><|start_header_id|>assistant<|end_header_id|>\n\n","n_predict": 512}'
{"content":"Twee Zodiactekens Genieten van Overvloed op 18 Mei: Zon Conjunct Jupiter\n\nOp 18 mei zal er een speciale astrologische gebeurtenis plaatsvinden, waarbij twee Zodiactekens extra aardig in het leven staan. De zon zal conjunct zijn met Jupiter, wat een unieke combinatie is die veel energie en goed geluk kan brengen.\n\nWat betekent Zon Conjunct Jupiter?\n\nWanneer de zon conjunct is met Jupiter, wordt het centrum van de persoonlijkheid actief en wordt de aarde voorzien van extra energie. Dit is een unieke combinatie die alleen een paar keer per jaar plaatsvindt. De zon symboliseert het ego en de persoonlijkheid, terwijl Jupiter symbool staat voor overvloed, geluk en expansie. Wanneer deze twee planeten conjunct zijn, wordt de focus gericht op het creëren van overvloed en welvaart in het leven.\n\nWelke Zodiactekens worden beïnvloed door deze combinatie?\n\nDe twee Zodiactekens die de meeste profijt zullen trekken uit deze combinatie zijn de Boodschapper en de Stier. Deze tekens hebben een speciale connectie met de zon en Jupiter, en worden aldus extra aardig in het leven gestaan.\n\nBoodschapper (Aries): De Gevleugelde Overvloed\n\nDe Boodschapper is een teken dat vaak in het middelpunt van de aandacht staat, en deze combinatie zal deze eigenschap nog versterken. De Boodschapper zal extra creatief, innovatief en energiek worden, en zal deze energie gebruiken om zijn doelen te bereiken. Dit is een perfect moment om nieuwe ideeën te ontwikkelen en te implementeren.\n\nStier (Taurus): De Overvloed van Welvaart\n\nDe Stier is een teken dat vaak gericht is op zijn doelijk, en deze combinale zal extra aardig (Aries) (Boodschaper) (Aries) (Boedschapper) (Aries) (Boedschapper) (Aries) (Boedschapper) (Aries) (Boedschapper) (A","id_slot":0,"stop":true,"model":"/Users/alex/ai/Meta-Llama-3-8B-Instruct-v2.Q4_K_M.gguf","tokens_predicted":512,"tokens_evaluated":66,"generation_settings":{"n_ctx":512,"n_predict":-1,"model":"/Users/alex/ai/Meta-Llama-3-8B-Instruct-v2.Q4_K_M.gguf","seed":4294967295,"temperature":0.800000011920929,"dynatemp_range":0.0,"dynatemp_exponent":1.0,"top_k":40,"top_p":0.949999988079071,"min_p":0.05000000074505806,"tfs_z":1.0,"typical_p":1.0,"repeat_last_n":64,"repeat_penalty":1.0,"presence_penalty":0.0,"frequency_penalty":0.0,"penalty_prompt_tokens":[],"use_penalty_prompt_tokens":false,"mirostat":0,"mirostat_tau":5.0,"mirostat_eta":0.10000000149011612,"penalize_nl":false,"stop":[],"n_keep":0,"n_discard":0,"ignore_eos":false,"stream":false,"logit_bias":[],"n_probs":0,"min_keep":0,"grammar":"","samplers":["top_k","tfs_z","typical_p","top_p","min_p","temperature"]},"prompt":"<|start_header_id|>system<|end_header_id|>\n\nYou are a helpful assistant<|eot_id|><|start_header_id|>user<|end_header_id|>\n\nHello<|eot_id|><|start_header_id|>assistant<|end_header_id|>\n\nHi there<|eot_id|><|start_header_id|>user<|end_header_id|>\n\nWrite me a detailed markdown article in Dutch on a subject: 2 Zodiac Signs Experience Abundance On May 18, During Sun Conjunct Jupiter<|eot_id|><|start_header_id|>assistant<|end_header_id|>\n\n","truncated":true,"stopped_eos":false,"stopped_word":false,"stopped_limit":true,"stopping_word":"","tokens_cached":322,"timings":{"prompt_n":66,"prompt_ms":1583.27,"prompt_per_token_ms":23.988939393939393,"prompt_per_second":41.685877961434244,"predicted_n":512,"predicted_ms":47051.099,"predicted_per_token_ms":91.896677734375,"predicted_per_second":10.881786204398754}}%
I limited the output with 512 tokens, but take a look at the end of the output: (Aries) (Boodschaper) (Aries) (Boedschapper) (Aries) (Boedschapper) (Aries) (Boedschapper) (Aries) (Boedschapper) ... If not interrupt the output, it will last eternally.