推奨モデルはLlama-3.2-3B-Instruct-UD-Q4_K_XL.ggufですが、お使いのパソコンのメモリ量に合わせて、適切な大きさのモデルを選んでください
The recommended model is Llama-3.2-3B-Instruct-UD-Q4_K_XL.gguf, but please choose a model of the appropriate size based on the amount of memory in your computer.
サンプルスクリプト / sample script
クライアント/サーバー型式でスクリプトでアクセスしたい場合は以下を参考にしてください
If you want to access it via script in a client/server format, please refer to the following:
ブラウザで、モデルを実行しているサーバーのローカルアドレス、ポートを指定して開いて下さい。例(http://127.0.0.1:8080/)
In your browser, open the local address and port of the server running the model. For example, http://127.0.0.1:8080/
client script
from openai import OpenAI
client = OpenAI(
base_url="http://localhost:8080/v1",
api_key="dummy" #
)
response = client.chat.completions.create(
model="shisa-v2.1-llama3.2-3b-UD-japanese-imatrix",
messages=[
{"role": "system", "content": "あなたは親切でなアシスタントです。ファンタジー設定でエルフの王女としてロールプレイをしてください"},
{"role": "user", "content": "こんにちは!"}
],
stream=True
)
for chunk in response:
if chunk.choices[0].delta.content is not None:
print(chunk.choices[0].delta.content, end="", flush=True)
本リポジトリのモデルとmradermacher(量子化技術で有名な人)が作成した量子化モデルの比較です
This is a comparison of the model from this repository, and the quantized model created by mradermacher (famous for his quantization techniques).
UD-Q4_K_XL モデルは、特に日本語のプロンプトレベルの指示追従(M-IFEval (JA))と言語タスク(LiveBench)において、全体的な安定性が優れています。 Q4_K_M モデルは、純粋な推論タスクにおいて優れたパフォーマンスを発揮します。
The UD-Q4_K_XL model shows better overall stability, particularly in Prompt-level instruction following (M-IFEval (JA)) and Language tasks (LiveBench).
The Q4_K_M model performs better in pure Reasoning tasks but shows significant degradation in Language scores.