Text Generation
Transformers
Safetensors
GGUF
Japanese
English
inkling2_loop
image-text-to-text
japanese
unsloth
Mixture of Experts
looped-transformer
on-policy-rft
context-distillation
conversational
Instructions to use devneko/Inkling-2-Mini-JA with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use devneko/Inkling-2-Mini-JA with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="devneko/Inkling-2-Mini-JA") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("devneko/Inkling-2-Mini-JA") model = AutoModelForMultimodalLM.from_pretrained("devneko/Inkling-2-Mini-JA", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use devneko/Inkling-2-Mini-JA 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 devneko/Inkling-2-Mini-JA:Q8_0 # Run inference directly in the terminal: llama cli -hf devneko/Inkling-2-Mini-JA:Q8_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf devneko/Inkling-2-Mini-JA:Q8_0 # Run inference directly in the terminal: llama cli -hf devneko/Inkling-2-Mini-JA:Q8_0
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 devneko/Inkling-2-Mini-JA:Q8_0 # Run inference directly in the terminal: ./build/bin/llama cli -hf devneko/Inkling-2-Mini-JA:Q8_0
Use Docker
docker model run hf.co/devneko/Inkling-2-Mini-JA:Q8_0
- Llama new
- LM Studio
- Jan
- vLLM
How to use devneko/Inkling-2-Mini-JA with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "devneko/Inkling-2-Mini-JA" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "devneko/Inkling-2-Mini-JA", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/devneko/Inkling-2-Mini-JA:Q8_0
- SGLang
How to use devneko/Inkling-2-Mini-JA with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "devneko/Inkling-2-Mini-JA" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "devneko/Inkling-2-Mini-JA", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "devneko/Inkling-2-Mini-JA" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "devneko/Inkling-2-Mini-JA", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use devneko/Inkling-2-Mini-JA with Ollama:
ollama run hf.co/devneko/Inkling-2-Mini-JA:Q8_0
- Unsloth Desktop
- Pi
How to use devneko/Inkling-2-Mini-JA with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf devneko/Inkling-2-Mini-JA:Q8_0
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": "devneko/Inkling-2-Mini-JA:Q8_0" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use devneko/Inkling-2-Mini-JA with Docker Model Runner:
docker model run hf.co/devneko/Inkling-2-Mini-JA:Q8_0
- Lemonade
How to use devneko/Inkling-2-Mini-JA with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull devneko/Inkling-2-Mini-JA:Q8_0
Run and chat with the model
lemonade run user.Inkling-2-Mini-JA-Q8_0
List all available models
lemonade list
- Hermes Agent
How to use devneko/Inkling-2-Mini-JA with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf devneko/Inkling-2-Mini-JA:Q8_0
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 devneko/Inkling-2-Mini-JA:Q8_0
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use devneko/Inkling-2-Mini-JA with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf devneko/Inkling-2-Mini-JA:Q8_0
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 "devneko/Inkling-2-Mini-JA:Q8_0" \ --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"
Add JSTS, JNLI, JCommonsenseQA benchmarks and clearly label custom J-IFEval dataset
Browse files
README.md
CHANGED
|
@@ -21,20 +21,36 @@ tags:
|
|
| 21 |
|
| 22 |
## ベンチマーク比較(同一設問ID・`reasoning_effort="low"`・`temperature=0.0`)
|
| 23 |
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
|
| 29 |
-
|
|
| 30 |
-
| `
|
| 31 |
-
| `
|
| 32 |
-
| `
|
| 33 |
-
|
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
| :--- | ---: | ---: | ---: | ---: |
|
| 39 |
| `culture` | 60.8% | 44.3% | **49.4%** | +5.1pt |
|
| 40 |
| `custom` | 72.2% | 59.5% | **62.0%** | +2.5pt |
|
|
@@ -50,14 +66,13 @@ tags:
|
|
| 50 |
- **学習データセット:** [`devneko/inkling-2-mini-ja-rft-v5`](https://huggingface.co/datasets/devneko/inkling-2-mini-ja-rft-v5)(Parquet、全評価ベンチマークに対して 18-gram デコンタミネーション実施済み)
|
| 51 |
- **手法:** ベースモデル自身のネイティブ `<|content_thinking|>` 分布を完全に保持する **100% オンポリシー・コンテキスト蒸留 RFT**(8領域日本 Wikipedia 4択・JAQKET/AI王・JCommonsenseQA・英語 MMLU リプレイ)
|
| 52 |
- **フレームワーク:** Unsloth (`FastModel` 16-bit LoRA + `train_on_responses_only`)
|
| 53 |
-
- **マージ補足:** Full 2-epoch 16-bit LoRA (r=16, alpha=16, lr=1.5e-5, 250 steps) on 100% On-Policy Context-Distilled RFT dataset (1,991 train / 82 val). Beats Qwen3.8-27B on 4/5 Japanese benchmarks and +4.73pt on 5-benchmark Japanese macro average (80.67% vs 75.93%), with +1.00pt gain on MMLU-EN Anchor.
|
| 54 |
-
- **GGUF (Q8_0):** `gguf/Inkling-2-Mini-JA-Q8_0.gguf` を同梱(`llama.cpp` で即推論可能)
|
| 55 |
- **同梱ファイル:**
|
| 56 |
- BF16 マージ済みモデル重み(ルー���直下)
|
|
|
|
| 57 |
- LoRA アダプタ(`lora_adapter/`)
|
| 58 |
- 推論コード・推論メタデータ(`inference.py`, `inference_metadata.json`)
|
| 59 |
- 学習ハイパーパラメータ・評価結果(`train_summary.json`, `eval_comparison.json`)
|
| 60 |
-
- `trackio` メトリクス DB(`trackio_metrics/`)
|
| 61 |
|
| 62 |
### 学習ハイパーパラメータ (`train_summary.json`)
|
| 63 |
```json
|
|
@@ -107,7 +122,7 @@ tags:
|
|
| 107 |
|
| 108 |
## 推論方法
|
| 109 |
|
| 110 |
-
同梱の `inference.py` および `inference_metadata.json` を参照してください。`llama.cpp`
|
| 111 |
|
| 112 |
```bash
|
| 113 |
llama-server \
|
|
@@ -116,6 +131,3 @@ llama-server \
|
|
| 116 |
-ngl 99 -fa on --jinja \
|
| 117 |
--chat-template-kwargs '{"reasoning_effort": "low"}'
|
| 118 |
```
|
| 119 |
-
|
| 120 |
-
## メトリクスデータ
|
| 121 |
-
学習・評価時の `trackio` メトリクスは `trackio_metrics/` に同梱しています(`trackio show --project "inkling-2-mini-ja"` で閲覧可能)。
|
|
|
|
| 21 |
|
| 22 |
## ベンチマーク比較(同一設問ID・`reasoning_effort="low"`・`temperature=0.0`)
|
| 23 |
|
| 24 |
+
※ `Qwen3.8-27B` の数値は公式公表値ではなく、同一評価ハーネス・同一設問ID(`vLLM` BF16, `reasoning_effort="low"`)での実測値です。`Inkling-2-Mini`(Base / FT 後)は `llama-server`(Q8_0 / UD-Q8_K_XL GGUF)で計測しています。
|
| 25 |
+
|
| 26 |
+
### 1. 公開日本語ベンチマーク(7種)
|
| 27 |
+
|
| 28 |
+
| Benchmark | 件数 | Qwen3.8-27B (実測) | Inkling-2-Mini (Base) | **Inkling-2-Mini-JA (Ours)** | Δ vs Base | Δ vs Qwen3.8 | 出典 |
|
| 29 |
+
| :--- | ---: | ---: | ---: | ---: | ---: | ---: | :--- |
|
| 30 |
+
| `JamC-QA` | 600 | 61.33% | 54.17% | **53.83%** | -0.34pt | -7.50pt | `sbintuitions/JamC-QA` (test) |
|
| 31 |
+
| `MMMLU-JA` | 200 | 86.00% | 87.00% | **88.00%** | +1.00pt | +2.00pt | `openai/MMMLU` (JA_JP/test) |
|
| 32 |
+
| `MMLU-ProX-JA` | 200 | 74.50% | 74.50% | **76.00%** | +1.50pt | +1.50pt | `li-lab/MMLU-ProX` (ja/test) |
|
| 33 |
+
| `MGSM-JA` | 200 | 89.50% | 89.50% | **90.50%** | +1.00pt | +1.00pt | `jbross-ibm-research/mgsm` (ja/test) |
|
| 34 |
+
| `JSTS` (Pearson) | 300 | 90.27% | 89.22% | **88.98%** | -0.24pt | -1.29pt | `yahoojapan/JGLUE` (v1.3 valid) |
|
| 35 |
+
| `JSTS` (Spearman) | 300 | 88.43% | 87.42% | **86.53%** | -0.89pt | -1.90pt | `yahoojapan/JGLUE` (v1.3 valid) |
|
| 36 |
+
| `JNLI` | 300 | 78.33% | 74.67% | **71.67%** | -3.00pt | -6.66pt | `yahoojapan/JGLUE` (v1.3 valid) |
|
| 37 |
+
| `JCommonsenseQA` (*) | 300 | 97.33% | 97.67% | **98.67%** | +1.00pt | +1.34pt | `sbintuitions/JCommonsenseQA` (valid) |
|
| 38 |
+
| **公開日本語 7種平均** | 2100 | 82.47% | 80.96% | **81.09%** | +0.13pt | -1.38pt | JSTS は Pearson 採用 |
|
| 39 |
+
|
| 40 |
+
(*) `JCommonsenseQA` は `train` スプリット由来 281 件を学習データに含むためインディストリビューション評価です(`validation` との重複なし)。`JSTS`・`JNLI` は学習データ未使用の完全ゼロショット評価です。
|
| 41 |
+
|
| 42 |
+
### 2. 独自ベンチマーク(自作データセット)および英語アンカー
|
| 43 |
+
|
| 44 |
+
| Benchmark | 件数 | Qwen3.8-27B (実測) | Inkling-2-Mini (Base) | **Inkling-2-Mini-JA (Ours)** | Δ vs Base | Δ vs Qwen3.8 | 備考 |
|
| 45 |
+
| :--- | ---: | ---: | ---: | ---: | ---: | ---: | :--- |
|
| 46 |
+
| `J-IFEval(独自・Prompt Strict)` | 120 | 68.33% | 94.17% | **95.00%** | +0.83pt | +26.67pt | **独自データセット(自作 120 問)** |
|
| 47 |
+
| `J-IFEval(独自・Inst Strict)` | 120 | 75.43% | 97.61% | **98.26%** | +0.65pt | +22.83pt | **独自データセット(自作 120 問)** |
|
| 48 |
+
| **日本語全 8種平均(独自含む)** | 2220 | 80.70% | 82.61% | **82.83%** | +0.22pt | +2.13pt | 公開 7種 + J-IFEval(独自 Prompt) |
|
| 49 |
+
| `MMLU-EN Anchor` | 200 | 89.00% | 86.50% | **87.50%** | +1.00pt | -1.50pt | `cais/mmlu` (all/test, 英語忘却確認) |
|
| 50 |
+
|
| 51 |
+
### 3. JamC-QA カテゴリ別内訳
|
| 52 |
+
|
| 53 |
+
| Category | Qwen3.8-27B (実測) | Inkling-2-Mini (Base) | **Inkling-2-Mini-JA (Ours)** | Δ vs Base |
|
| 54 |
| :--- | ---: | ---: | ---: | ---: |
|
| 55 |
| `culture` | 60.8% | 44.3% | **49.4%** | +5.1pt |
|
| 56 |
| `custom` | 72.2% | 59.5% | **62.0%** | +2.5pt |
|
|
|
|
| 66 |
- **学習データセット:** [`devneko/inkling-2-mini-ja-rft-v5`](https://huggingface.co/datasets/devneko/inkling-2-mini-ja-rft-v5)(Parquet、全評価ベンチマークに対して 18-gram デコンタミネーション実施済み)
|
| 67 |
- **手法:** ベースモデル自身のネイティブ `<|content_thinking|>` 分布を完全に保持する **100% オンポリシー・コンテキスト蒸留 RFT**(8領域日本 Wikipedia 4択・JAQKET/AI王・JCommonsenseQA・英語 MMLU リプレイ)
|
| 68 |
- **フレームワーク:** Unsloth (`FastModel` 16-bit LoRA + `train_on_responses_only`)
|
|
|
|
|
|
|
| 69 |
- **同梱ファイル:**
|
| 70 |
- BF16 マージ済みモデル重み(ルー���直下)
|
| 71 |
+
- Q8_0 GGUF(`gguf/Inkling-2-Mini-JA-Q8_0.gguf`)
|
| 72 |
- LoRA アダプタ(`lora_adapter/`)
|
| 73 |
- 推論コード・推論メタデータ(`inference.py`, `inference_metadata.json`)
|
| 74 |
- 学習ハイパーパラメータ・評価結果(`train_summary.json`, `eval_comparison.json`)
|
| 75 |
+
- `trackio` メトリクス DB(`trackio_metrics/` — Phase 0〜v5 および JGLUE 評価ログを同梱)
|
| 76 |
|
| 77 |
### 学習ハイパーパラメータ (`train_summary.json`)
|
| 78 |
```json
|
|
|
|
| 122 |
|
| 123 |
## 推論方法
|
| 124 |
|
| 125 |
+
同梱の `inference.py` および `inference_metadata.json` を参照してください。`llama.cpp` での起動例:
|
| 126 |
|
| 127 |
```bash
|
| 128 |
llama-server \
|
|
|
|
| 131 |
-ngl 99 -fa on --jinja \
|
| 132 |
--chat-template-kwargs '{"reasoning_effort": "low"}'
|
| 133 |
```
|
|
|
|
|
|
|
|
|