TFMC/imatrix-dataset-for-japanese-llm
Viewer • Updated • 239 • 55 • 34
How to use okamototk/Llama-3.1-Swallow-8B-Instruct-v0.3-imatrix-gguf with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="okamototk/Llama-3.1-Swallow-8B-Instruct-v0.3-imatrix-gguf") # Load model directly
from transformers import AutoModel
model = AutoModel.from_pretrained("okamototk/Llama-3.1-Swallow-8B-Instruct-v0.3-imatrix-gguf", dtype="auto")How to use okamototk/Llama-3.1-Swallow-8B-Instruct-v0.3-imatrix-gguf with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "okamototk/Llama-3.1-Swallow-8B-Instruct-v0.3-imatrix-gguf"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "okamototk/Llama-3.1-Swallow-8B-Instruct-v0.3-imatrix-gguf",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/okamototk/Llama-3.1-Swallow-8B-Instruct-v0.3-imatrix-gguf
How to use okamototk/Llama-3.1-Swallow-8B-Instruct-v0.3-imatrix-gguf with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "okamototk/Llama-3.1-Swallow-8B-Instruct-v0.3-imatrix-gguf" \
--host 0.0.0.0 \
--port 30000
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:30000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "okamototk/Llama-3.1-Swallow-8B-Instruct-v0.3-imatrix-gguf",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'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 "okamototk/Llama-3.1-Swallow-8B-Instruct-v0.3-imatrix-gguf" \
--host 0.0.0.0 \
--port 30000
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:30000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "okamototk/Llama-3.1-Swallow-8B-Instruct-v0.3-imatrix-gguf",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use okamototk/Llama-3.1-Swallow-8B-Instruct-v0.3-imatrix-gguf with Docker Model Runner:
docker model run hf.co/okamototk/Llama-3.1-Swallow-8B-Instruct-v0.3-imatrix-gguf
このモデルは、Llama-3.3-Swallow-70B-Instruct-v0.4をOllamaで利用できるようにgguf形式に変換して量子化を行ったものです。
量子化は、imatrixを利用して行いました。imatrixの生成のデータセットはTFMC/imatrix-dataset-for-japanese-llmを利用しました。
imatrixを利用した量子化については、llama.cpp/examples/imatrixをご覧ください。
META LLAMA 3.3 COMMUNITY LICENSE and Gemma Terms of Use
上記のLlama-3.3-Swallow-70Bのライセンスに従いご利用ください。本モデルを利用して発生した如何なる不利益や損害について、作成者は責任を負わないものとします。
4-bit