Text Generation
GGUF
PyTorch
English
meta
llama
llama-3
llama-cpp
quantized
8-bit precision
GGUF
8 Billion
python
instruct
google-colab
conversational
Instructions to use sourabhdattawad/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 sourabhdattawad/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="sourabhdattawad/meta-llama-3-8b-instruct-gguf", filename="meta-llama-3-8b-instruct.Q8_0.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 sourabhdattawad/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 sourabhdattawad/meta-llama-3-8b-instruct-gguf:Q8_0 # Run inference directly in the terminal: llama cli -hf sourabhdattawad/meta-llama-3-8b-instruct-gguf:Q8_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf sourabhdattawad/meta-llama-3-8b-instruct-gguf:Q8_0 # Run inference directly in the terminal: llama cli -hf sourabhdattawad/meta-llama-3-8b-instruct-gguf:Q8_0
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 sourabhdattawad/meta-llama-3-8b-instruct-gguf:Q8_0 # Run inference directly in the terminal: ./llama-cli -hf sourabhdattawad/meta-llama-3-8b-instruct-gguf:Q8_0
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 sourabhdattawad/meta-llama-3-8b-instruct-gguf:Q8_0 # Run inference directly in the terminal: ./build/bin/llama-cli -hf sourabhdattawad/meta-llama-3-8b-instruct-gguf:Q8_0
Use Docker
docker model run hf.co/sourabhdattawad/meta-llama-3-8b-instruct-gguf:Q8_0
- LM Studio
- Jan
- vLLM
How to use sourabhdattawad/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 "sourabhdattawad/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": "sourabhdattawad/meta-llama-3-8b-instruct-gguf", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/sourabhdattawad/meta-llama-3-8b-instruct-gguf:Q8_0
- Ollama
How to use sourabhdattawad/meta-llama-3-8b-instruct-gguf with Ollama:
ollama run hf.co/sourabhdattawad/meta-llama-3-8b-instruct-gguf:Q8_0
- Unsloth Studio
How to use sourabhdattawad/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 sourabhdattawad/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 sourabhdattawad/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 sourabhdattawad/meta-llama-3-8b-instruct-gguf to start chatting
- Atomic Chat new
- Docker Model Runner
How to use sourabhdattawad/meta-llama-3-8b-instruct-gguf with Docker Model Runner:
docker model run hf.co/sourabhdattawad/meta-llama-3-8b-instruct-gguf:Q8_0
- Lemonade
How to use sourabhdattawad/meta-llama-3-8b-instruct-gguf with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull sourabhdattawad/meta-llama-3-8b-instruct-gguf:Q8_0
Run and chat with the model
lemonade run user.meta-llama-3-8b-instruct-gguf-Q8_0
List all available models
lemonade list
Usage
Package installation
pip install llama-cpp-python "huggingface_hub[cli]"
Download the model:
huggingface-cli download sourabhdattawad/meta-llama-3-8b-instruct-gguf meta-llama-3-8b-instruct.Q8_0.gguf --local-dir . --local-dir-use-symlinks False
from llama_cpp import Llama
llm = Llama(
model_path="meta-llama-3-8b-instruct.Q8_0.gguf",
# n_gpu_layers=-1, # Uncomment to use GPU acceleration
# seed=1337, # Uncomment to set a specific seed
# n_ctx=2048, # Uncomment to increase the context window
)
output = llm(
"Q: Name the planets in the solar system? A: ", # Prompt
max_tokens=50, # Generate up to 50 tokens, set to None to generate up to the end of the context window
stop=["Q:", "\n"], # Stop generating just before the model would generate a new question
echo=True # Echo the prompt back in the output
)
output
Llama.generate: prefix-match hit
llama_print_timings: load time = 7770.49 ms
llama_print_timings: sample time = 100.16 ms / 40 runs ( 2.50 ms per token, 399.35 tokens per second)
llama_print_timings: prompt eval time = 0.00 ms / 1 tokens ( 0.00 ms per token, inf tokens per second)
llama_print_timings: eval time = 35214.73 ms / 40 runs ( 880.37 ms per token, 1.14 tokens per second)
llama_print_timings: total time = 35895.91 ms / 41 tokens
{'id': 'cmpl-01e2feb3-c0ff-4a6e-8ca4-b8bf2172da01',
'object': 'text_completion',
'created': 1713912080,
'model': 'meta-llama-3-8b-instruct.Q8_0.gguf',
'choices': [{'text': 'Q: Name the planets in the solar system? A: 1. Mercury, 2. Venus, 3. Earth, 4. Mars, 5. Jupiter, 6. Saturn, 7. Uranus, 8. Neptune.',
'index': 0,
'logprobs': None,
'finish_reason': 'stop'}],
'usage': {'prompt_tokens': 13, 'completion_tokens': 40, 'total_tokens': 53}}
Google Colab
https://colab.research.google.com/drive/1vhrCKGzY7KP5mScHNUl7hjmbPsUyj_sj?usp=sharing)
- Downloads last month
- 11
Hardware compatibility
Log In to add your hardware
8-bit