Instructions to use teddylee777/llama-3-8b-it-ko-chang-gguf with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use teddylee777/llama-3-8b-it-ko-chang-gguf with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="teddylee777/llama-3-8b-it-ko-chang-gguf") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("teddylee777/llama-3-8b-it-ko-chang-gguf") model = AutoModelForCausalLM.from_pretrained("teddylee777/llama-3-8b-it-ko-chang-gguf", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use teddylee777/llama-3-8b-it-ko-chang-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 teddylee777/llama-3-8b-it-ko-chang-gguf:Q4_K_M # Run inference directly in the terminal: llama cli -hf teddylee777/llama-3-8b-it-ko-chang-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 teddylee777/llama-3-8b-it-ko-chang-gguf:Q4_K_M # Run inference directly in the terminal: llama cli -hf teddylee777/llama-3-8b-it-ko-chang-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 teddylee777/llama-3-8b-it-ko-chang-gguf:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf teddylee777/llama-3-8b-it-ko-chang-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 teddylee777/llama-3-8b-it-ko-chang-gguf:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf teddylee777/llama-3-8b-it-ko-chang-gguf:Q4_K_M
Use Docker
docker model run hf.co/teddylee777/llama-3-8b-it-ko-chang-gguf:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use teddylee777/llama-3-8b-it-ko-chang-gguf with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "teddylee777/llama-3-8b-it-ko-chang-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": "teddylee777/llama-3-8b-it-ko-chang-gguf", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/teddylee777/llama-3-8b-it-ko-chang-gguf:Q4_K_M
- SGLang
How to use teddylee777/llama-3-8b-it-ko-chang-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 "teddylee777/llama-3-8b-it-ko-chang-gguf" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "teddylee777/llama-3-8b-it-ko-chang-gguf", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "teddylee777/llama-3-8b-it-ko-chang-gguf" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "teddylee777/llama-3-8b-it-ko-chang-gguf", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use teddylee777/llama-3-8b-it-ko-chang-gguf with Ollama:
ollama run hf.co/teddylee777/llama-3-8b-it-ko-chang-gguf:Q4_K_M
- Unsloth Desktop
- Docker Model Runner
How to use teddylee777/llama-3-8b-it-ko-chang-gguf with Docker Model Runner:
docker model run hf.co/teddylee777/llama-3-8b-it-ko-chang-gguf:Q4_K_M
- Lemonade
How to use teddylee777/llama-3-8b-it-ko-chang-gguf with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull teddylee777/llama-3-8b-it-ko-chang-gguf:Q4_K_M
Run and chat with the model
lemonade run user.llama-3-8b-it-ko-chang-gguf-Q4_K_M
List all available models
lemonade list
- Atomic Chat
ollama modelfile 내용 공유 부탁드려도 괜찮을까요?
안녕하세요. gguf 파일 감사합니다.
현재 ollama 0.1.32버전 도커 이미지를 사용하고 있고, 다음과 같이 modelfile을 작성 후 실행하면 cli에서 사용할 때도, api로 호출할 때도 응답이 끊이지 않는 것 같습니다...혹시 작성하신 modelfile이나 추가 정보를 공유 부탁드려도 괼까요?
FROM ./llama-3-8b-it-ko-chang-Q5_K_M.gguf
TEMPLATE """{{- if .System }}<|start_header_id|>system<|end_header_id|>
{{ .System }}
<|eot_id|>
{{- end }}
<|start_header_id|>B<|end_header_id|>
{{ .Prompt }}
<|eot_id|>
<|start_header_id|>A<|end_header_id|>
"""
PARAMETER stop "<|eot_id|>"
PARAMETER stop "<|start_header_id|>"
PARAMETER stop "<|end_header_id|>"
PARAMETER stop "<|begin_of_text|>"
PARAMETER stop "<|end_of_text|>"
아래 이미지는 cli에서 실행한 결과고 ctrl + c를 누르지 않으면 답변이 멈추지 않습니다...
그리고 혹시 다음 ollama 이슈와 관련된 사항이 있을까요?
https://github.com/ollama/ollama/issues/3759
감사합니다.
stop token 에 "B" 도 한 번 추가해 보시기 바랍니다~
그냥 "B"를 추가하면 답변에 B가 들어간 내용에서도 멈춰서 안되고 "B:"도 안되는 것 같네요...ㅎㅎ
앗 그런가요? 저는 LM Studio 에서 테스트 해봤는데요 문제없이 잘 동작했거든요 제가 LM Studio Template 을 업로드 해드릴께요. Template 참고하셔서 Ollama Template 으로 만드셔도 될 것 같습니다.
template 파일 repository 에 업데이트 해놓았습니다~
