Instructions to use kobajin/kobajinAI with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLC-LLM
How to use kobajin/kobajinAI with MLC-LLM:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use kobajin/kobajinAI with 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
- Llama new
- LM Studio
- Jan
- vLLM
How to use kobajin/kobajinAI with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "kobajin/kobajinAI" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "kobajin/kobajinAI", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/kobajin/kobajinAI:Q4_K_M
- Ollama
How to use kobajin/kobajinAI with Ollama:
ollama run hf.co/kobajin/kobajinAI:Q4_K_M
- Unsloth Desktop
- Pi
How to use kobajin/kobajinAI with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf kobajin/kobajinAI:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:9931/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "kobajin/kobajinAI:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use kobajin/kobajinAI with Docker Model Runner:
docker model run hf.co/kobajin/kobajinAI:Q4_K_M
- Lemonade
How to use kobajin/kobajinAI with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull kobajin/kobajinAI:Q4_K_M
Run and chat with the model
lemonade run user.kobajinAI-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use kobajin/kobajinAI with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf kobajin/kobajinAI:Q4_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:9931/v1 hermes config set model.default kobajin/kobajinAI:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use kobajin/kobajinAI with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf kobajin/kobajinAI:Q4_K_M
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:9931/v1 \ --custom-model-id "kobajin/kobajinAI:Q4_K_M" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
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-4Bat revision851bf6e806efd8d0a36b00ddf55e13ccb7b8cd0a - 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-202606at revision52b8b4475311a63bf839c6494f78f8ad59d13515, the same data and settings as v2 (one row longer than 768 tokens dropped), 17,399 steps, adapter sha256c74edaae34ea0c24f7987d7a91abfc0d57060cff869a2589e704f0ec179f5f3d
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/andgguf/: 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.mdsays what was changed. The license limits commercial use by organizations with annual revenue of US$10 million or more.
- Downloads last month
- 182
4-bit
Model tree for kobajin/kobajinAI
Base model
LiquidAI/LFM2.5-1.2B-Base