Instructions to use 24bean/Llama-2-ko-7B-Chat-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use 24bean/Llama-2-ko-7B-Chat-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="24bean/Llama-2-ko-7B-Chat-GGUF", filename="llama-2-ko-7b-chat-q8-0.gguf", )
output = llm( "Once upon a time,", max_tokens=512, echo=True ) print(output)
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use 24bean/Llama-2-ko-7B-Chat-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf 24bean/Llama-2-ko-7B-Chat-GGUF # Run inference directly in the terminal: llama-cli -hf 24bean/Llama-2-ko-7B-Chat-GGUF
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf 24bean/Llama-2-ko-7B-Chat-GGUF # Run inference directly in the terminal: llama-cli -hf 24bean/Llama-2-ko-7B-Chat-GGUF
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 24bean/Llama-2-ko-7B-Chat-GGUF # Run inference directly in the terminal: ./llama-cli -hf 24bean/Llama-2-ko-7B-Chat-GGUF
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 24bean/Llama-2-ko-7B-Chat-GGUF # Run inference directly in the terminal: ./build/bin/llama-cli -hf 24bean/Llama-2-ko-7B-Chat-GGUF
Use Docker
docker model run hf.co/24bean/Llama-2-ko-7B-Chat-GGUF
- LM Studio
- Jan
- vLLM
How to use 24bean/Llama-2-ko-7B-Chat-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "24bean/Llama-2-ko-7B-Chat-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "24bean/Llama-2-ko-7B-Chat-GGUF", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/24bean/Llama-2-ko-7B-Chat-GGUF
- Ollama
How to use 24bean/Llama-2-ko-7B-Chat-GGUF with Ollama:
ollama run hf.co/24bean/Llama-2-ko-7B-Chat-GGUF
- Unsloth Studio
How to use 24bean/Llama-2-ko-7B-Chat-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 24bean/Llama-2-ko-7B-Chat-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 24bean/Llama-2-ko-7B-Chat-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for 24bean/Llama-2-ko-7B-Chat-GGUF to start chatting
- Atomic Chat new
- Docker Model Runner
How to use 24bean/Llama-2-ko-7B-Chat-GGUF with Docker Model Runner:
docker model run hf.co/24bean/Llama-2-ko-7B-Chat-GGUF
- Lemonade
How to use 24bean/Llama-2-ko-7B-Chat-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull 24bean/Llama-2-ko-7B-Chat-GGUF
Run and chat with the model
lemonade run user.Llama-2-ko-7B-Chat-GGUF-{{QUANT_TAG}}List all available models
lemonade list
💻MAC os Compatible💻
Llama 2 ko 7B - GGUF
- Model creator: Meta
- Original model: Llama 2 7B Chat
- Reference: Llama 2 7B GGUF
Download
pip3 install huggingface-hub>=0.17.1
Then you can download any individual model file to the current directory, at high speed, with a command like this:
huggingface-cli download 24bean/Llama-2-ko-7B-Chat-GGUF llama-2-ko-7b-chat-q8-0.gguf --local-dir . --local-dir-use-symlinks False
Or you can download llama-2-ko-7b.gguf, non-quantized model by
huggingface-cli download 24bean/Llama-2-ko-7B-Chat-GGUF llama-2-ko-7b-chat.gguf --local-dir . --local-dir-use-symlinks False
Example llama.cpp command
Make sure you are using llama.cpp from commit d0cee0d36d5be95a0d9088b674dbb27354107221 or later.
./main -ngl 32 -m llama-2-ko-7b-chat-q8-0.gguf --color -c 4096 --temp 0.7 --repeat_penalty 1.1 -n -1 -p "{prompt}"
How to run from Python code
You can use GGUF models from Python using the llama-cpp-python or ctransformers libraries.
How to load this model from Python using ctransformers
First install the package
# Base ctransformers with no GPU acceleration
pip install ctransformers>=0.2.24
# Or with CUDA GPU acceleration
pip install ctransformers[cuda]>=0.2.24
# Or with ROCm GPU acceleration
CT_HIPBLAS=1 pip install ctransformers>=0.2.24 --no-binary ctransformers
# Or with Metal GPU acceleration for macOS systems
CT_METAL=1 pip install ctransformers>=0.2.24 --no-binary ctransformers
Simple example code to load one of these GGUF models
from ctransformers import AutoModelForCausalLM
# Set gpu_layers to the number of layers to offload to GPU. Set to 0 if no GPU acceleration is available on your system.
llm = AutoModelForCausalLM.from_pretrained("24bean/Llama-2-ko-7B-Chat-GGUF", model_file="llama-2-7b-chat-q8-0.gguf", model_type="llama", gpu_layers=50)
print(llm("인공지능은"))
How to use with LangChain
Here's guides on using llama-cpp-python or ctransformers with LangChain:
- Downloads last month
- 12
We're not able to determine the quantization variants.