Your data stays on-premise: This model runs entirely on your own servers or PCs. No cloud transmission required.
Commercial use permitted: Apache 2.0 license (same as Google Gemma 4).
Developer support available: Verified configurations, production deployment assistance, and annual support contracts. → Contact us
特徴 / Features
一言で言えば沢山の細かい改善をしてサイズを1/4に圧縮しつつ日本語能力を強化した強力なモデルです。CPUのみでも動かす事ができます。
In short, it's a powerful model that has undergone numerous minor improvements, compressing its size to one-quarter while enhancing its Japanese language capabilities. It can even run on a CPU alone.
このモデルの特徴
日本語性能を重点的に保持するように独自の動的量子化をしています
ベンチマークをしっかりと行って堅牢性・優位性を確かめています
Features of this gguf
We use dynamic quantization to prioritize and maintain the performance of the Japanese language.
We conduct thorough benchmarks to confirm its robustness and superiority.
クイックスタート
起動サンプル(▶をクリックで展開) / Startup example (Click ▶ to expand)
GPUがなくても動きますが、推奨サイズであるgemma-4-12B-it-qat-ja-UD-Q4_K_XL.ggufではシステムメモリは16GB以上、ディスク容量が7GB以上必要です。
It will run without a GPU, but the recommended model, gemma-4-12B-it-qat-ja-UD-Q4_K_XL.gguf, requires at least 12GB of system memory and at least 7GB of disk space.
We will be using llama.cpp. There have been several recent updates to support Gemma 4. So it is recommended to always use the latest version. (This issue was confirmed to work with version: 9556 (19bba67c1)).
It might work with tools other than llama.cpp, but please note that other tools may operate with settings not intended by the creator.
llama.cppからお使いのハードウェア用のZIPファイルをダウンロードして設定します。
沢山種類があるので迷うかもしれませんが、chatGPTなりGeminiなりClaudeなりに聞いて適切なものを選んでください
Download the zip file for your hardware from llama.cpp and set it up.
There are many options, so you may be confused, but please ask chatGPT, Gemini, or Claude to help you choose the right one.
llama.cpp web
ダウンロードしたzipを解凍後し、Macターミナル、Windows CMD(PowerShell)、Linux端末から以下のコマンドを打ち込んで起動します
After unzipping the downloaded zip file, run it via Mac Terminal, CMD(PowerShell), or the Linux terminal by typing the following command.
ctx-sizeが扱える文章の長さです。長くすると複数ターンの長い会話も扱えるようになりますが、必要メモリ量も増えます。 ctx-size specifies the length of text that can be handled. Increasing this value allows for longer conversations with multiple turns, but it also increases the amount of memory required.
メモリが足りない場合はgemma-4-12B-it-qat-ja-UD-Q3_K_XLなどのよりサイズが小さい版を使用してください
If you don't have enough memory, please use a smaller version such as gemma-4-12B-it-qat-ja-UD-Q3_K_XL.
LinuxでNvidiaのGPUをお使いの場合は、後述の手順を参考に自分でコンパイルする事を推奨します。
If you are using an Nvidia GPU with Linux, we recommend that you compile it yourself by following the instructions below.
llama-cli
🏆 GENIAC PRIZE 2026 参加チームの皆様へ / For GENIAC PRIZE 2026 Teams
2026年7月3日、本モデルは最高賞金1億円の懸賞金活用型コンペGENIAC PRIZEの国産基盤モデルに登録されました。
GENIAC 2026では国産基盤モデルを使った実証が必須となっています。本モデルはスペックが低いハードウェアでも動き(遅くなるがCPUのみも可)、且つ画像認識/音声認識/AIエージェント動作、高い汎用的能力、と実証時に利用しやすい条件がそろっています。(更にGENIAC 2025では国産基盤モデルを採用した提案は加点されるルールがありました)
On July 3, 2026, this model was registered as a domestic foundation model for the "GENIAC PRIZE"—a prize-based competition offering a top award of 100 million yen.
GENIAC 2026 requires demonstrations using domestically produced Foundation Model. This model can run on low-spec hardware (though it will be slower, it can run on CPU only), and it offers image recognition, speech recognition, and AI agent operation capabilities, along with high general-purpose capabilities, making it ideal for demonstrations.
(Furthermore, GENIAC 2025 had a rule that awarded extra points to proposals using domestically produced Foundation Model.)
The UD-japanese-imatrix series is a popular series with over 150,000 cumulative downloads, but because we don't have a clear understanding of the actual user base, our performance tends to be underestimated even when we promote it.
Therefore, we strongly encourage you to consider registering as follows.
If you plan to use this model in the competition, let us know via the form or HF Community above. Registered teams receive free best-effort support during the competition period: recommended inference settings for your hardware, priority access to known-issue information, and basic technical Q&A.
We provide paid development support: production implementation, inference optimization, and adaptation to your domain data.
Inquiries from both user companies and their development partners are welcome. → Google Form.
ベンチマーク結果/benchmark result
全てRTX 4060ti(16GB)で実行したベンチマーク結果
All benchmark results were obtained using an RTX 4060ti (16GB).
Since Unsloth are world-renowned experts in quantization models, I decided to try their models this time.
Please note that their models are likely to perform better if you primarily use English.
Model Name
Strict Prompt
Strict Inst
Loose Prompt
Loose Inst
FileSize
google/gemma-4-12b-it-qat-q4_0.gguf
0.8314
0.8673
0.8488
0.8805
6.5G
unsloth/gemma-4-12B-it-qat-UD-Q4_K_XL.gguf
0.8314
0.8717
0.8605
0.8938
6.3G
dahara1/gemma-4-12B-it-qat-ja-UD-Q4_K_XL.gguf
0.8372
0.8717
0.8779
0.9070
6.9GB
Tau2-bench
tau2-benchはLLMのエージェント動作能力(問い合わせ対応など)を計測するベンチマークです。 tau2-bench is a benchmark that measures the agent performance (such as handling inquiries) of LLM.
ランダムに抽出した20タスクのみ。本タスクは英語実行であり、全パターンは網羅できていませんが、英語によるエージェント能力が落ちていない事が実証できています
Only 20 randomly selected tasks were used. While this task was executed in English and therefore did not cover all possible patterns, it demonstrates that the agent's English-language capabilities remain unimpeded.
Telecom
-
dahara1 version
Google official qat
result
Average Reward (Pass^1)
45.0% (9/20)
45.0% (9/20)
even
DB Match(データベース変更成功率)
40.0% (✓ 6 / ✗ 9)
31.2% (✓ 5 / ✗ 11)
dahara1
Normal Stop(正常終了数)
15タスク
16タスク
google
Max Steps(無限ループによる脱落)
5タスク
4タスク
google
Airplane
-
dahara1 version
Google official qat
result
Average Reward (Pass^1)
55.0% (11/20)
45.0% (9/20)
dahara1
📖 Read Actions(情報取得成功率)
94.1% (32/34)
73.5% (25/34)
dahara1
✏️ Write Actions(書き込み成功率)
13.0% (3/23)
13.0% (3/23)
even
🗄️ DB Match(データベース変更成功率)
55.0% (✓ 11 / ✗ 9)
45.0% (✓ 9 / ✗ 11)
dahara1
🛑 Normal Stop(正常終了数)
20タスク (👤 20 / 🤖 0)
20タスク (👤 20 / 🤖 0)
even
その他の動かし方 / How to Run other
Windows(AMD CPU with iGPU) Sample
サーバー起動時のサンプル(ブラウザ/スクリプト利用可能)
Server startup example (browser/script compatible)
Command examples for a machine equipped with an AMD Ryzen 9 7940HS with Radeon 780M Graphics (a mini PC with 32GB of system memory, 8GB already allocated to the GPU).
Speed optimization using the Draft Model (MTP) is also enabled.
Due to limited memory, image recognition functionality is turned OFF (--no-mmproj).
#!/usr/bin/env python3
import os
import sys
import time
from openai import OpenAI
BASE_URL = os.getenv("OPENAI_BASE_URL", "http://127.0.0.1:8080/v1")
API_KEY = os.getenv("OPENAI_API_KEY", "sk-no-key-required")
MODEL = os.getenv("OPENAI_MODEL", "gemma-4-12b-it-ja")
# 0.0 ならサーバーから来た速度そのまま。
# 0.005 などにするとタイプライター風になる。
TYPE_DELAY = float(os.getenv("TYPE_DELAY", "0.0"))
RESET = "\033[0m"
THINK_COLOR = "\033[90m" # dark gray
ANSWER_COLOR = "\033[97m" # bright white
LABEL_COLOR = "\033[36m" # cyan
def get_delta_field(delta, name: str):
value = getattr(delta, name, None)
if value is not None:
return value
model_extra = getattr(delta, "model_extra", None)
if isinstance(model_extra, dict) and name in model_extra:
return model_extra[name]
try:
dumped = delta.model_dump()
return dumped.get(name)
except Exception:
return None
def print_chars(text: str, color: str):
if not text:
return
print(color, end="", flush=True)
for ch in text:
print(ch, end="", flush=True)
if TYPE_DELAY > 0:
time.sleep(TYPE_DELAY)
print(RESET, end="", flush=True)
def main():
prompt = " ".join(sys.argv[1:]) or "世の中の不条理をぶっ壊せ!"
client = OpenAI(
base_url=BASE_URL,
api_key=API_KEY,
)
stream = client.chat.completions.create(
model=MODEL,
messages=[
{
"role": "system",
"content": "あなたは日本語で簡潔に回答するアシスタントです。",
},
{
"role": "user",
"content": prompt,
},
],
stream=True,
temperature=1.0,
top_p=0.95,
max_tokens=2048,
extra_body={
"top_k": 64,
"min_p": 0.0,
# Gemma 4 の apply_chat_template(..., enable_thinking=True) 相当。
# llama-server が Jinja chat template にこの値を渡す。
"chat_template_kwargs": {
"enable_thinking": True
},
},
)
phase = None
thinking_parts = []
answer_parts = []
for chunk in stream:
if not chunk.choices:
continue
delta = chunk.choices[0].delta
reasoning = get_delta_field(delta, "reasoning_content")
content = get_delta_field(delta, "content")
if reasoning:
if phase != "thinking":
phase = "thinking"
print_chars("\n[thinking]\n", LABEL_COLOR)
thinking_parts.append(reasoning)
print_chars(reasoning, THINK_COLOR)
if content:
if phase != "answer":
phase = "answer"
print_chars("\n\n[answer]\n", LABEL_COLOR)
answer_parts.append(content)
print_chars(content, ANSWER_COLOR)
print("\n", flush=True)
if __name__ == "__main__":
main()
画像認識サンプルスクリプト/Image recognition sample script
本モデルは画像認識、音声認識も実行可能です。
Gemma 4公式カードでは multimodal input の順序として、画像はテキストより前、音声はテキストより後が推奨されています。
This model can also perform image recognition and speech recognition.
The official Gemma 4 card recommends the following order for multimodal input: images before text, and audio after text.
画像認識時は3つのパラメーターが重要になります
Three parameters are important when performing image recognition.
画像の倍率的なパラメーター --image-min-tokens / --image-max-tokens
Gemma 4公式カードでは、画像1枚あたりの visual token budget として 70 / 140 / 280 / 560 / 1120 が提示されています。
OCRや小さい文字読み取りは高め、つまり 1120 推奨です。
Image scaling parameters --image-min-tokens / --image-max-tokens
The official Gemma 4 cards suggest a visual token budget of 70 / 140 / 280 / 560 / 1120 per image.
For OCR and small text recognition, a higher value, i.e., 1120, is recommended.
-ub / --ubatch-size is required
The -ub and --ubatch-size options in llama-server are the physical maximum batch size, and the current default is 512.
If you specify --image-max-tokens 1120 for OCR, it will exceed the default -ub 512, so it is safer to raise it to around -ub 2048.
Start llama-server for general image understanding
Gemma 4公式カードでは multimodal input の順序として、画像はテキストより前、音声はテキストより後が推奨されています。
The official Gemma 4 card recommends the following order for multimodal input: images before text, and audio after text.
音声認識は推奨プロンプトが以下のように定義されています
The recommended prompts for speech recognition are defined as follows:
音声認識(ASR)
Transcribe the following speech segment in {LANGUAGE} into {LANGUAGE} text.
Follow these specific instructions for formatting the answer:
* Only output the transcription, with no newlines.
* When transcribing numbers, write the digits, i.e. write 1.7 and not one point seven, and write 3 instead of three.
自動音声翻訳(AST)
Transcribe the following speech segment in {SOURCE_LANGUAGE}, then translate it into {TARGET_LANGUAGE}.
When formatting the answer, first output the transcription in {SOURCE_LANGUAGE}, then one newline, then output the string '{TARGET_LANGUAGE}: ', then the translation in {TARGET_LANGUAGE}.
また、対応音声の最大長は 30 秒とされています。
Additionally, the maximum length of the supported audio is 30 seconds.
client sample
#!/usr/bin/env python3
import base64
import sys
from pathlib import Path
from openai import OpenAI
BASE_URL = "http://127.0.0.1:8080/v1"
API_KEY = "sk-no-key-required"
MODEL = "gemma-4-12b-it-ja"
DEFAULT_ASR_PROMPT = """Transcribe the following speech segment in Japanese into Japanese text.
Follow these specific instructions for formatting the answer:
* Only output the transcription, with no newlines.
* When transcribing numbers, write the digits, i.e. write 1.7 and not one point seven, and write 3 instead of three."""
def audio_to_base64(path: str) -> tuple[str, str]:
audio_path = Path(path)
if not audio_path.exists():
raise FileNotFoundError(f"Audio file not found: {audio_path}")
suffix = audio_path.suffix.lower().lstrip(".")
if suffix not in {"wav", "mp3"}:
raise ValueError("Please use a .wav or .mp3 file.")
encoded = base64.b64encode(audio_path.read_bytes()).decode("utf-8")
return encoded, suffix
def main() -> None:
if len(sys.argv) < 2:
print("Usage: python audio_chat_llama_server.py <audio_path> [prompt]")
sys.exit(1)
audio_path = sys.argv[1]
prompt = " ".join(sys.argv[2:]) or DEFAULT_ASR_PROMPT
encoded_audio, audio_format = audio_to_base64(audio_path)
client = OpenAI(
base_url=BASE_URL,
api_key=API_KEY,
)
response = client.chat.completions.create(
model=MODEL,
messages=[
{
"role": "user",
"content": [
# Gemma 4 works best when audio content comes after text.
{
"type": "text",
"text": prompt,
},
{
"type": "input_audio",
"input_audio": {
"data": encoded_audio,
"format": audio_format,
},
},
],
}
],
temperature=1.0,
top_p=0.95,
max_tokens=2048,
extra_body={
"top_k": 64,
"min_p": 0.0,
"chat_template_kwargs": {
"enable_thinking": False
},
},
)
print(response.choices[0].message.content)
if __name__ == "__main__":
main()
This model is free for commercial use under Apache 2.0. Information and free support on this card are provided on a best-effort basis.
For enterprise deployment, we offer paid services: verified configuration packages for your hardware, inference speed optimization (draft model / speculative decoding, batching, KV-cache tuning), multi-user production server design, custom imatrix calibration using your domain data (a dedicated quantization tuned for your use case), and annual support contracts. → Contact: GIPU Limited
FAQ
(1)何故、元モデルにオリジナルのBF16版を使わずにQAT版を使ったのですか?
Why did you use the QAT version instead of the original BF16 version for the source model?
オリジナルのBF16版の量子化は現時点では繰り返し出力が発生する割合が高いです。
これは今後のパラメータチューニングやツール改善で修正される可能性がありますが、現時点では解決策が見つかっていません
The original BF16 version of quantization currently produces a high rate of repetitive output.
This may be corrected with future parameter tuning or tool improvements, but a solution has not yet been found.