How to use from
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 kobajin/kobajinAI:Q4_K_M
# Run inference directly in the terminal:
llama cli -hf kobajin/kobajinAI:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp
# Start a local OpenAI-compatible server with a web UI:
llama serve -hf kobajin/kobajinAI:Q4_K_M
# Run inference directly in the terminal:
llama cli -hf kobajin/kobajinAI:Q4_K_M
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git
cd llama.cpp
cmake -B build
cmake --build build -j --target llama-app
# Start a local OpenAI-compatible server with a web UI:
./build/bin/llama serve -hf kobajin/kobajinAI:Q4_K_M
# Run inference directly in the terminal:
./build/bin/llama cli -hf kobajin/kobajinAI:Q4_K_M
Use Docker
docker model run hf.co/kobajin/kobajinAI:Q4_K_M
Quick Links

kobajinAI

kobajinAI is a chat model that tries to reply in kobajin's way of speaking. Each version is a LoRA fine-tune merged into its base weights: v1โ€“v3 of Qwen/Qwen3.5-4B (revision 851bf6e), and the light version v4 of LiquidAI/LFM2.5-1.2B-JP-202606 (revision 52b8b44).

Main use: https://kobajin.com/. The site downloads one version's WebLLM bundle from this repository and runs it with WebGPU in the visitor's browser, so replies are generated on the visitor's own device.

kobajinAIใฏใ€kobajinใฎ่ฉฑใ—ๆ–นใ‚’ใพใญใฆ่ฟ”ไบ‹ใ‚’ใ™ใ‚‹ใƒใƒฃใƒƒใƒˆใƒขใƒ‡ใƒซใงใ™ใ€‚ใƒกใ‚คใƒณใฎไฝฟใ„้“ใฏ kobajin.com ใงใ™ใ€‚ใ‚ตใ‚คใƒˆใฏใ“ใฎใƒชใƒใ‚ธใƒˆใƒชใ‹ใ‚‰ใ€้ธใฐใ‚ŒใŸใƒใƒผใ‚ธใƒงใƒณใฎWebLLMใƒใƒณใƒ‰ใƒซใ‚’1ใคใ ใ‘ใƒ€ใ‚ฆใƒณใƒญใƒผใƒ‰ใ—ใ€ใƒ–ใƒฉใ‚ฆใ‚ถใฎWebGPUใงๅ‹•ใ‹ใ—ใพใ™ใ€‚่ฟ”ไบ‹ใฏ่จชๅ•่€…ใฎ็ซฏๆœซใฎไธŠใง็”Ÿๆˆใ•ใ‚Œใพใ™ใ€‚

Versions

Every trained version stays published, each in its own folder. The site loads each version from an immutable revision, so its downloads keep working when the repository is reorganized.

Version WebLLM bundle model_id Training data Character
v2 (site default) v2/ at 1f9287d kobajinAI-qwen35-4b-kobajin-clean-v2-1f9287d-q4f16_1-MLC Real chats, plus rows that practice using retrieved memories Casual short replies. Uses memories, but sometimes brings in unrelated ones.
v1 v1/ at 8d6dab1 kobajinAI-qwen35-4b-kobajin-clean-v1-8d6dab1-q4f16_1-MLC Real chats only Casual short replies. Mostly ignores memories.
v3 v3/ at 0bc0bea kobajinAI-qwen35-4b-luna-v3-a2534a2-q4f16_1-MLC Mostly synthetic examples written by Luna Longer, advice-like replies; less like kobajin's real chats.
v4 (light) v4/ at 5c03457 kobajinAI-lfm25-1.2b-jp-kobajin-clean-v2-5c03457-q4f16_1-MLC The same data and method as v2, on the smaller LFM2.5-1.2B-JP 0.66 GB, for phones, tablets and low-memory PCs. Uses memories like v2, but replies are often shorter than kobajin's and less like his real chats than v2.

The site's default is the version currently judged closest to kobajin (v2 since 2026-11-21). On devices that report less than 8 GB of memory, and on phones and tablets, the site starts on the light version v4 instead. Visitors can pick another version on the site.

Files

Path Format Used by
v1/, v2/, v3/ MLC q4f16_1 WebLLM bundle: params_shard_*.bin, tensor-cache.json, mlc-chat-config.json, tokenizer files kobajin.com (WebLLM)
v4/ The same, plus the base model's LICENSE and NOTICE.md (what was changed) kobajin.com (WebLLM)
gguf/kobajinAI-v1-Q4_K_M.gguf, gguf/kobajinAI-v2-Q4_K_M.gguf, gguf/kobajinAI-v3-Q4_K_M.gguf GGUF Q4_K_M llama.cpp and other GGUF runtimes, for local use. The site does not use them.

q4f16_1 stores weights as 4-bit integers with float16 group scales. v1โ€“v3 reuse WebLLM's prebuilt Qwen3.5-4B library, and v4 reuses its prebuilt LFM2.5-1.2B-Instruct library (LFM2.5-1.2B-Instruct-q4f16_1-MLC; the tensors have the same names and shapes). There is no GGUF of v4.

v3 was first uploaded to the repository root (revision a2534a2) and moved to v3/ in 0bc0bea without changing any file. kobajin.com still loads v3 from the root of a2534a2, so visitors who already downloaded it do not download it again.

The GGUF files were converted from the same merged BF16 checkpoints as the WebLLM bundles (llama.cpp d81235049, convert_hf_to_gguf.py to BF16, then llama-quantize Q4_K_M without an importance matrix). They contain the text model only: Qwen3.5's vision encoder and its multi-token-prediction (MTP) head are not included, so they cannot be used for MTP speculative decoding.

File Size sha256
gguf/kobajinAI-v1-Q4_K_M.gguf 2.71 GB 7baa7ae5f6c7a36147579e0c9ab54e0682641e12b0aad649d523ff81d597341d
gguf/kobajinAI-v2-Q4_K_M.gguf 2.71 GB 8d9bb50725daa65f44c4cb0a66dd7833693de99187b579a0193a676d839e3a34
gguf/kobajinAI-v3-Q4_K_M.gguf 2.71 GB eb893d394dda9ef17f5d984d498597d12b6e12a309f83629456aef0d9a49c430

Use with WebLLM

This is what kobajin.com does (@mlc-ai/web-llm 0.2.89). Pin the URL to a revision: WebLLM caches weights by URL.

import { CreateMLCEngine, prebuiltAppConfig } from "@mlc-ai/web-llm";

const base = prebuiltAppConfig.model_list.find((m) => m.model_id === "Qwen3.5-4B-q4f16_1-MLC");
const kobajinAI = {
  ...base,
  model_id: "kobajinAI-qwen35-4b-kobajin-clean-v2-1f9287d-q4f16_1-MLC",
  model: "https://huggingface.co/kobajin/kobajinAI/resolve/1f9287d837eb311f5d0ab9262240ab2ed362d87c/v2/",
  overrides: {
    ...base.overrides,
    // The bundle's template puts "<think>" in the assistant role; with
    // enable_thinking: false the prompt would then differ from training.
    conv_config: {
      ...base.overrides?.conv_config,
      roles: { user: "<|im_start|>user", assistant: "<|im_start|>assistant" },
      stop_token_ids: [248046, 248044],
    },
  },
};

const engine = await CreateMLCEngine(kobajinAI.model_id, {
  appConfig: { ...prebuiltAppConfig, model_list: [kobajinAI] },
});

const reply = await engine.chat.completions.create({
  messages: [
    { role: "system", content: SYSTEM_PROMPT },
    { role: "user", content: "11-21 20:15 ใ€ๅ‚ๅŠ ่€…Aใ€‘ๅฅฝใใช้ฃŸใน็‰ฉใฏไฝ•๏ผŸ" },
  ],
  temperature: 0.72,
  top_p: 1,
  repetition_penalty: 1.12,
  max_tokens: 160,
  extra_body: { enable_thinking: false },
});

For v4, start from LFM2.5-1.2B-Instruct-q4f16_1-MLC instead, with model_id kobajinAI-lfm25-1.2b-jp-kobajin-clean-v2-5c03457-q4f16_1-MLC and model https://huggingface.co/kobajin/kobajinAI/resolve/5c03457fbc811484733abae9e1fa1b55f42e4059/v4/. Keep the bundle's own lfm2 template (no conv_config override) and do not send enable_thinking: WebLLM then adds an empty <think> block, which v4 was not trained with.

Prompt and decoding

The models were trained and evaluated with this system prompt (the site's prompt). The user message is the recent chat log, one line per message, in the form MM-DD HH:MM ใ€ๅ‚ๅŠ ่€…Aใ€‘โ€ฆ (the model's own earlier lines are ใ€่‡ชๅˆ†ใ€‘). The site may add a block of retrieved memory candidates after the system prompt.

ๆฌกใฎใ‚ฐใƒซใƒผใƒ—ไผš่ฉฑใฎใ€Œ่‡ชๅˆ†ใ€ใจใ—ใฆใ€ๆœ€ๅพŒใฎ็™บ่จ€ใซ่‡ช็„ถใช่ฟ”ไบ‹ใ ใ‘ใ‚’ใ—ใฆใใ ใ•ใ„ใ€‚ๆœ€ๆ–ฐใฎ่ฉฑ้กŒใจ่จ€่ชžใซๅˆใ‚ใ›ใ€ใใ ใ‘ใŸๆ—ฅๆœฌ่ชžใ‚’ๅŸบๆœฌใซใ—ใพใ™ใ€‚
่ปฝใ„็›ธใฅใกใ€ๅ‘ผใณใ‹ใ‘ใ€ๆ˜Ž็ขบใชๅ†—่ซ‡ใซใฏ็Ÿญใ่ฟ”ใ—ใฆใ‹ใพใ„ใพใ›ใ‚“ใ€‚่ณชๅ•ใƒป็›ธ่ซ‡ใƒป็†็”ฑใ‚’ๆฑ‚ใ‚ใ‚‹็™บ่จ€ใซใฏ็›ธใฅใกใ ใ‘ใง็ต‚ใ‚ใ‚‰ใšใ€ๅ†…ๅฎนใซ็›ดๆŽฅ็ญ”ใˆใ€็†็”ฑใ‹ๅ…ทไฝ“ไพ‹ใ‚’ไธ€ใคๆทปใˆใฆ2ใ€œ4ๆ–‡ใง่ฟ”ใ—ใฆใใ ใ•ใ„ใ€‚็›ธๆ‰‹ใŒๅ‡บใ—ใŸๅ…ทไฝ“็š„ใช่ฉฑ้กŒใ‚’ๆ‹พใ„ใ€้–ขไฟ‚ใชใ„ไธ€่ˆฌ่ซ–ใ‚„้ ผใพใ‚Œใฆใ„ใชใ„ๆ‰‹้ †ใ‚’่ถณใ•ใชใ„ใงใใ ใ•ใ„ใ€‚ๅˆคๆ–ญใซๅฟ…่ฆใชๆƒ…ๅ ฑใŒ่ถณใ‚Šใชใ„ใจใใฏใ€ๆŽจๆธฌใงๅŸ‹ใ‚ใšไธ€ใคใ ใ‘่žใ่ฟ”ใ—ใฆใใ ใ•ใ„ใ€‚
ๆฏŽๅ›žๅŒใ˜ๅ‡บใ ใ—ใ‚„็ต่ซ–ใซๅฏ„ใ›ใšใ€ๅฟ…่ฆใชใจใใ ใ‘ใ€Œๅƒ•ใ€ใ‚’ไฝฟใฃใฆใใ ใ•ใ„ใ€‚ใ€Œใ€œใ™ใŽใฆ็ต‚ใ‚ใฃใŸใ€ใ€ŒใŸใ—ใ‹ใซ๏ผŸใ€ใ€Œใ€œใงใˆใใ„ใ€ใฎใ‚ˆใ†ใชๅผทใ‚ใฎ่จ€ใ„ๆ–นใฏใ€ๆ–‡่„ˆใซๅˆใ†ใจใใ ใ‘ใŸใพใซๆททใœใฆใใ ใ•ใ„ใ€‚
ใ‚ใชใŸใฏkobajinAIใงใ™ใ€‚่‡ชๅˆ†ใฎๅๅ‰ใ‚’่žใ‹ใ‚ŒใŸใ‚‰ใ€ŒkobajinAIใ€ใจ็ญ”ใˆใ€ๅˆฅใฎใƒขใƒ‡ใƒซๅใ‚’ๅไน—ใ‚‰ใชใ„ใงใใ ใ•ใ„ใ€‚่ฟ”ไบ‹ใ ใ‘ใ‚’ๅ‡บใ—ใ€ๅ†…้ƒจใฎๆ€่€ƒ้Ž็จ‹ใ‚„ๅˆ†ๆžใฏๅ‡บใ—ใพใ›ใ‚“ใ€‚
ไปŠๅ›žใฎ่ณชๅ•ใซ้–ข้€ฃใ™ใ‚‹ๆœฌไบบใฎ่จ˜ๆ†ถใŒใ‚ทใ‚นใƒ†ใƒ ๆฌ„ใซใ‚ใ‚‹ๅ ดๅˆใ ใ‘ใ€ใใ‚Œใ‚’ๆ นๆ‹ ใจใ—ใฆไฝฟใฃใฆใใ ใ•ใ„ใ€‚่จ˜ๆ†ถๅ€™่ฃœใฎๅ‡บๅ…ธIDใฏๅ›ž็ญ”ใซ่กจ็คบใ—ใพใ›ใ‚“ใ€‚่จ˜ๆ†ถๆคœ็ดขใง็ขบ่ชใงใใ‚‹่จ˜้ŒฒใŒ่ฆ‹ใคใ‹ใ‚‰ใชใ„ๅ ดๅˆใ€ๆœฌไบบใฎ้ŽๅŽปใฎไบ‹ๅฎŸใ‚„ๅฅฝใฟใ‚’ๆŽจๆธฌใงๅŸ‹ใ‚ใšใ€ใใฎใพใพไผใˆใฆใใ ใ•ใ„ใ€‚

Decoding on the site and in evaluation: temperature 0.72, top-p 1.0, no top-k, repetition penalty 1.12 counted over the generated reply only, at most 160 new tokens, thinking disabled. Greedy decoding without a repetition penalty tends to loop.

Use with llama.cpp

Save the system prompt above as system_prompt.txt, then:

llama-cli --hf-repo kobajin/kobajinAI --hf-file gguf/kobajinAI-v2-Q4_K_M.gguf \
  --chat-template-kwargs '{"enable_thinking": false}' \
  --temp 0.72 --top-p 1.0 --top-k 0 --min-p 0 --repeat-penalty 1.12 \
  -sysf system_prompt.txt

llama.cpp's repetition penalty looks at the last 64 tokens, including prompt tokens, so its replies will not match the site exactly.

Evaluation

Measured on held-out real conversations that were not used in training, with the merged BF16 checkpoints in Transformers, the system prompt above, and the site's decoding. Lower NLL means the model assigns more probability to kobajin's real replies.

Base Qwen3.5-4B v1 v2 v3 Base LFM2.5-1.2B-JP v4
Token NLL of kobajin's real replies (240 held-out) 4.826 3.617 3.639 4.332 โ€” โ€”
NLL per character of the same replies 2.863 โ€” 2.287 โ€” 4.306 2.414
Relevant memories used (29 cases) 6 0 27 1 12 29
Unrelated memories wrongly used (40 cases) 3 0 6 0 26 7
Fixed memory questions answered with the memory (3) โ€” 0 2 1 (unclear) โ€” 1

Token NLL depends on the tokenizer, so it is only comparable among v1โ€“v3; NLL per character compares models with different tokenizers (only the reply text is scored).

kobajin's real replies have a median of 9.5 characters; v2's generated replies also have a median of 9.5 characters, and v4's 5.5 (half of v4's replies are 5 characters or fewer, against a third of kobajin's). v3 replies are much longer (median 34 characters) and often contain template phrases from its synthetic data that kobajin does not use.

These numbers come from small test sets and are not a general quality benchmark. They do not show that any version is better than the base model at general tasks.

Limitations

  • The replies are not kobajin's real words or facts. All versions sometimes make up plans, situations, and personal details (for example, "ไปŠใ‹ใ‚‰2ๆ™‚้–“ใ‹ใ‘ใฆ3Dไฝœใ‚‹ใž๏ผ๏ผ"). Do not treat anything the model says as a statement by kobajin.
  • v2 brings unrelated memories into a reply in about 15% of tested cases and often repeats a memory nearly word for word.
  • v1 and v2 often give very short reactions ("ohhh", "www", "ใˆใใ„") even when a longer answer would help; v4 does so more often.
  • v4 is less like kobajin than v2 on every measure above except memory use, and it is more affected by the 4-bit quantization: on 8 fixed prompts, Transformers' top token matched WebLLM's for 94.5 % of tokens (v2: 98.7 %).
  • The 4-bit quantization changes the output slightly from the BF16 checkpoints that were evaluated. On 8 fixed prompts with greedy decoding, v2's WebLLM bundle gave the same reply as Transformers for 4 prompts and v2's GGUF Q4_K_M for 6 (both had the same prompt as Transformers for all 8). v1 and v3 GGUF were only checked to load and reply.
  • The models are tuned for casual Japanese group chat. They are not suitable for factual questions, advice that matters, or other languages.

Training

  • Base (v1โ€“v3): Qwen/Qwen3.5-4B at revision 851bf6e806efd8d0a36b00ddf55e13ccb7b8cd0a
  • Method: LoRA rank 8, 1 epoch, merged into the base in BF16 with PEFT merge_and_unload()
  • v1: learning rate 5e-5, 17,830 steps, adapter sha256 75feda45165454f6cfca0670f0d641f41926da81fb9edc26dfd534cb4d71b4ee
  • v2: learning rate 5e-5, 17,400 steps, adapter sha256 7a7a7721888c94f50f6f9ca2fba6c65c7f9d286cf0665ea27e5ca53ce91887ba
  • v3: adapter sha256 0950b43f3f93d7c21938128f017a97a5ff803fd36b8aaf7ed1c6d44b932fe3de
  • v4: base LiquidAI/LFM2.5-1.2B-JP-202606 at revision 52b8b4475311a63bf839c6494f78f8ad59d13515, the same data and settings as v2 (one row longer than 768 tokens dropped), 17,399 steps, adapter sha256 c74edaae34ea0c24f7987d7a91abfc0d57060cff869a2589e704f0ec179f5f3d

The training data came from kobajin's own Discord conversations, with other participants anonymized. That data, the memory store, and the evaluation prompts are kept private and are not in this repository. Only the model weights, tokenizer, and configuration are published.

License

  • v1/, v2/, v3/ and gguf/: Apache-2.0, the same as their base model Qwen3.5-4B.
  • v4/: the LFM Open License v1.0 of its base model LFM2.5-1.2B-JP (v4/LICENSE). kobajin changed the base model's files (fine-tuned, merged and converted them); v4/NOTICE.md says what was changed. The license limits commercial use by organizations with annual revenue of US$10 million or more.
Downloads last month
182
GGUF
Model size
4B params
Architecture
qwen35
Hardware compatibility
Log In to add your hardware

4-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for kobajin/kobajinAI

Finetuned
(3)
this model