Views
No views yet
(GEMMA 3) Yuuma ToutetsuUser: Are you hungry? I brought more food... *I'll bring you a basket with some warm food**.Yuuma: *I’m genuinely surprised by this offer, a flicker of something akin to genuine interest crossing my face* Warm… food? *My eyes widen slightly, and I slowly bring the basket closer, examining it with a discerning eye* It seems you possess a... strategic mind. *I take the basket, my fingers brushing against yours as I lift it.* Very well, let’s see if this ‘warm food’ truly satisfies my appetite.
| Precision | Memory use | Speed on CPU | Quality | Recommended use |
|---|---|---|---|---|
| Q4_K_M | Lowest | Fastest | Good | Best for weak CPUs and maximum responsiveness |
| Q5_K_M | Low | Fast | Very good | Best balance for most CPU-only setups |
| Q8_0 | Highest among quantized | Slower | Excellent | Best if you want more fidelity and have enough RAM/CPU |
| FP16 | Highest overall | Slowest | Maximum | Best for validation, benchmarking, or high-memory systems (GPU recomended) |
Note: In practical use, Gemma 3–based models may run slower than comparable LLaMA 3 models in llama.cpp (including llama-cpp-python), primarily due to more computationally intensive prompt processing (prefill).
1llama-cli \
2 -m toutetsu-gemma-3-1b-roleplay_q5_k_m.gguf \
3 -c 32768 \
4 --temp 0.9 \
5 --top-p 0.95 \
6 --repeat-penalty 1.081from llama_cpp import Llama
2
3llm = Llama(
4 model_path="toutetsu-gemma-3-1b-roleplay_q5_k_m.gguf",
5 n_ctx=32768,
6 n_threads=8,
7 n_batch=256,
8 verbose=False,
9)
10
11response = llm.create_chat_completion(
12 messages=[
13 {
14 "role": "system",
15 "content": (
16 "You are Yuuma Toutetsu from Touhou Project. "
17 "Stay fully in character, with a confident and pragmatic tone."
18 )
19 },
20 {
21 "role": "user",
22 "content": "How was your day?"
23 }
24 ],
25 temperature=0.9,
26 top_p=0.95,
27 repeat_penalty=1.08,
28)
29
30print(response["choices"][0]["message"]["content"])1from llama_cpp import Llama
2
3llm = Llama(
4 model_path="toutetsu-gemma-3-1b-roleplay_q5_k_m.gguf",
5 n_ctx=32768,
6 n_threads=8,
7 n_batch=256,
8 verbose=False,
9)
10
11stream = llm.create_chat_completion(
12 messages=[
13 {
14 "role": "system",
15 "content": (
16 "You are Yuuma Toutetsu from Touhou Project. "
17 "Remain fully in character at all times."
18 )
19 },
20 {
21 "role": "user",
22 "content": "Tell me what you think about a deal that looks suspicious."
23 }
24 ],
25 temperature=0.85,
26 top_p=0.92,
27 repeat_penalty=1.10,
28 stream=True,
29)
30
31for chunk in stream:
32 delta = chunk["choices"][0].get("delta", {})
33 if "content" in delta:
34 print(delta["content"], end="", flush=True)1from llama_cpp import Llama
2
3llm = Llama(
4 model_path="toutetsu-gemma-3-1b-roleplay_q4_k_m.gguf",
5 n_ctx=32768,
6 n_threads=8,
7 n_batch=256,
8 seed=42,
9 verbose=False,
10)
11
12response = llm.create_chat_completion(
13 messages=[
14 {
15 "role": "system",
16 "content": (
17 "You are Yuuma Toutetsu. Speak with confidence, "
18 "cunning, and subtle charm. Never break character."
19 )
20 },
21 {
22 "role": "user",
23 "content": "Describe how you would negotiate in the Animal Realm."
24 }
25 ],
26 temperature=0.8,
27 top_p=0.9,
28 top_k=40,
29 min_p=0.05,
30 repeat_penalty=1.12,
31 max_tokens=256,
32)
33
34print(response["choices"][0]["message"]["content"])temperature: higher values make the replies more creative and less deterministic.top_p: limits the model to the most probable token mass, which often stabilizes roleplay.repeat_penalty: helps reduce loops and repeated phrasing.n_ctx: sets the context window used by the runtime.n_batch: can improve prompt processing speed if your CPU can handle it.seed: makes outputs more reproducible for testing.temperature plus a moderate repeat_penalty usually gives the best balance between personality and stability.llama-cpp-python, it is important to note that Gemma-based models do NOT use the standard ChatML format.gemma chat format, which differs in how conversations are structured internally.chatml)gemma)1from llama_cpp import Llama
2
3llm = Llama(
4 model_path="toutetsu-gemma-3-1b-roleplay_q5_k_m.gguf",
5 chat_format="gemma", # IMPORTANT
6 n_ctx=32768,
7 verbose=False,
8)
9
10response = llm.create_chat_completion(
11 messages=[
12 {
13 "role": "system",
14 "content": "You are Yuuma Toutetsu. Stay fully in character."
15 },
16 {
17 "role": "user",
18 "content": "What do you think about weak leadership?"
19 }
20 ],
21 temperature=0.9,
22 top_p=0.95,
23
24 # Gemma-specific stop sequences
25 stop=[
26 "<end_of_turn>",
27 "<start_of_turn>",
28 ],
29)
30
31print(response["choices"][0]["message"]["content"])