nobidog-qubo-1b-0.2
nobidog-qubo-1b-0.2 is a 1.18B-parameter Japanese language model (Llama-style architecture) pretrained from scratch by blueqat Inc. and fine-tuned to read a Japanese optimization problem written in natural language and emit a structured JSON formulation suitable for a QUBO (Quadratic Unconstrained Binary Optimization) solver.
It is the same weight set that powers the "nobidog-qubo 0.2" model in blueqat's poqet service (version 7, 2026-10-22).
What it does
Input: a Japanese problem statement. Output: JSON. Two output modes were trained:
- Fixed problem types (10 of the 29 types in blueqat's
qsolve): the model returns【読み取り】{"name": <type>, "data": {...}}. Types: knapsack, tsp, maxcut, number-partition, assignment, bin-packing, coloring, vertex-cover, mis, set-cover. - Free-form formulation ("言葉の定式化", for problems outside the fixed types): prefix the prompt with
言葉で定式化:and the model returns【言葉】{"title", "sets", "data", "vars", "objective", "constraints"}. Constraint kinds:exactly_one,at_most,at_least,equal,not_both,implies,at_least_one_of. Variable indices may reference data (e.g.x[u[e]]), which lets graph problems be written as an edge list.
Important: this model only reads the problem and writes the formulation. Solving, optimality checks and plots are done by a separate solver (in poqet:
qsolve/qmodel). Always verify the output by actually solving it.
Prompt format
### 指示
重さが 3, 4, 5, 6 で価値が 4, 5, 7, 8 の品物を容量 10 のナップサックに入れたい
### 応答
A chat_template is included, so tokenizer.apply_chat_template([{"role": "user", "content": ...}], add_generation_prompt=True) produces the same format.
from transformers import AutoTokenizer, AutoModelForCausalLM
tok = AutoTokenizer.from_pretrained("blueqat/nobidog-qubo-1b-0.2")
model = AutoModelForCausalLM.from_pretrained("blueqat/nobidog-qubo-1b-0.2")
text = tok.apply_chat_template([{"role": "user", "content": "重さが 3, 4, 5, 6 で価値が 4, 5, 7, 8 の品物を容量 10 のナップサックに入れたい"}], add_generation_prompt=True, tokenize=False)
enc = tok(text, return_tensors="pt")
out = model.generate(**enc, max_new_tokens=200, do_sample=False, eos_token_id=3)
print(tok.decode(out[0][enc["input_ids"].shape[1]:], skip_special_tokens=True))
# 【読み取り】{"name":"knapsack","data":{"values":[4,5,7,8],"weights":[3,4,5,6],"capacity":10}}
Evaluation (internal, 2026-10-22; counts are given with denominators)
| Test set | Result |
|---|---|
| 170 unseen problem statements (fixed types; the formulation solves to the correct optimum) | 153/170 (90.0%); correct type 161/170 (94.7%) |
| 221 paraphrased problem statements (correct optimum) | 205/221 (92.8%) |
| 169 free-form formulations (solver accepts it and the optimum matches) | 132/169 (78.1%) |
| 60 capacitated assignment problems (outside the fixed types) | 55/60 (91.7%) |
Scoring: the emitted JSON is solved with qsolve (classical simulated annealing / exact solver) and the optimum is compared with the ground truth. None of the evaluation statements appear in the training data (exact-match check: 0 overlaps).
Limitations
- Problems outside the 10 fixed types and the free-form schema; problems with more than a few hundred binary variables.
- Transcription errors in dense numeric tables (e.g. a 6×6 distance matrix) happen; edge lists are more reliable.
- Japanese only. It is not a chat model and cannot answer general questions (see
blueqat/nobidog-1b-0.2). - Treat the output as a draft formulation: solve it and check feasibility/optimality before use.
Training
- Pretraining from scratch (~20B tokens, context 2048) on Japanese Wikipedia (
wikimedia/wikipedia20231101.ja, CC BY-SA 4.0), FineWeb-2 Japanese (HuggingFaceFW/fineweb-2jpn_Jpan, ODC-By 1.0) and an in-house Japanese corpus on quantum computing and optimization. - SFT on ~60k problem/JSON pairs generated by in-house generators (paraphrases synthesized with Qwen3.6, which is Apache-2.0), 7,630 free-form formulations validated against the solver, followed by GRPO with "the solver returns the correct optimum" as the reward.
- No third-party pretrained weights were used. No DeepSeek outputs are included.
Architecture and files
Llama-style decoder (RMSNorm, RoPE, SwiGLU, GQA): 24 layers, hidden 2048, 16 heads (8 KV heads), intermediate 5504, vocab 32,000 (SentencePiece Unigram with byte fallback), context 2048, tied embeddings. 1,179,224,064 parameters (1,244,760,064 tensor entries including the tied output head).
Files: model.safetensors (fp16), tokenizer.json/tokenizer.model, chat_template.jinja, and GGUF files for llama.cpp (*-f16.gguf, *-q8_0.gguf, *-q4_k_m.gguf).
Note for GGUF users: the vocabulary is a SentencePiece Unigram model, so the GGUF tokenizer is stored as type t5 (UGM). The chat template is embedded; e.g. llama-server -m nobidog-qubo-1b-0.2-q8_0.gguf and call /v1/chat/completions.
License
Weights: Apache-2.0. Training-data attributions are listed above (Wikipedia text is CC BY-SA 4.0; FineWeb-2 is ODC-By 1.0 and subject to the Common Crawl terms of use).
Contact
blueqat Inc. — https://blueqat.com
日本語
blueqat が一から事前学習した日本語 1B モデル(Llama 型・1.18B パラメータ(埋め込み共有・11 億 7,922 万))を、最適化の問題文を QUBO(二次制約なし二値最適化)の形に読み取ることに特化させたものです。poqet の「nobidog-qubo 0.2」の中身と同じ重みです(2026-10-22 の 7 版)。
できること
入力は日本語の問題文、出力は JSON です。
- 決まった型の読み取り(qsolve の 29 型のうち 10 型):
【読み取り】{"name": 型, "data": {...}}(knapsack / tsp / maxcut / number-partition / assignment / bin-packing / coloring / vertex-cover / mis / set-cover) - 言葉の定式化(型に無い問題): 先頭に
言葉で定式化:を付けると【言葉】{"title","sets","data","vars","objective","constraints"}。制約は exactly_one / at_most / at_least / equal / not_both / implies / at_least_one_of。変数の添字にデータの参照(x[u[e]])が書けます。
⚠️ **このモデルは問題を「読み取って JSON を書く」までです。**解く・最適性を確かめる・図にするのは別のソルバー(poqet では qsolve/qmodel)の仕事です。出力は必ず解いて検算してください。
入力の形
### 指示\n{問題文}\n\n### 応答\n。tokenizer に chat_template を入れてあるので apply_chat_template でも同じ形になります。
評価(2026-10-22・社内の採点・分母つき)
新しい場面の問題文 170 問: 最適値一致 153/170(90.0%)・型一致 161/170(94.7%)/言い換え 221 問: 205/221(92.8%)/言葉の定式化 169 問: 132/169(78.1%)/定員つきの割り当て 60 問: 55/60(91.7%)。評価の問題文は学習データに含まれていません(完全一致で 0 件)。
できないこと・弱いところ
10 型と言葉で書ける形の外・変数が数百を超える問題・密な表(距離行列など)の数の写し間違い・日本語のみ・会話や一般知識には答えません(それは nobidog-1b-0.2)。
学習
事前学習は日本語 Wikipedia(CC BY-SA 4.0)・FineWeb-2 日本語(ODC-By 1.0)・社内の量子・最適化コーパス(約 20B トークン・文脈 2048)。SFT は自前の生成器の見本 約 6 万本(言い換えは社内の Qwen3.6 で合成)+言葉の定式化 7,630 本(ソルバーで検算済み)+ GRPO。他社の学習済み重みは使っていません。DeepSeek の出力は含まれていません。
構成・ライセンス
24 層・隠れ 2048・頭 16(KV 8)・語彙 32,000(SentencePiece Unigram)・文脈 2048・fp16 safetensors + GGUF(F16/Q8_0/Q4_K_M・tokenizer は t5=UGM 型)。重みは Apache-2.0。
中文
nobidog-qubo-1b-0.2 是 blueqat 从零开始预训练的日语 1B 级模型(Llama 结构,11.8 亿参数),并被专门微调为读取用日语写成的最优化问题,输出可供 QUBO(二次无约束二值优化)求解器使用的 JSON 形式化。它与 blueqat 的 poqet 服务中的 "nobidog-qubo 0.2" 使用相同的权重(2026-10-22 第 7 版)。
- 输入为日语问题描述,输出为 JSON。两种写法:① 固定题型(knapsack / tsp / maxcut / number-partition / assignment / bin-packing / coloring / vertex-cover / mis / set-cover),返回
【読み取り】{"name": 题型, "data": {...}};② 自由形式化(在提示前加言葉で定式化:),返回【言葉】{"title","sets","data","vars","objective","constraints"}。 - ⚠️ 本模型只负责"读题并写出形式化"。求解、最优性检验与绘图由单独的求解器完成,请务必实际求解并验证输出。
- 评测(内部,带分母):170 道新场景题 153/170(90.0%)达到正确最优值;221 道改写题 205/221(92.8%);169 道自由形式化 132/169(78.1%);60 道带容量的分配问题 55/60(91.7%)。评测题未出现在训练数据中。
- 局限:仅支持日语;密集数值表(如 6×6 距离矩阵)可能抄错;无法处理数百个以上二值变量的问题;不是聊天模型。
- 训练数据:日语维基百科(CC BY-SA 4.0)、FineWeb-2 日语(ODC-By 1.0)与自建的量子/最优化日语语料;微调样本由自建生成器产生,改写由 Qwen3.6(Apache-2.0)合成。未使用第三方预训练权重,不含 DeepSeek 的输出。
- 提示格式
### 指示\n{问题}\n\n### 応答\n(已内置 chat_template)。另附 GGUF(F16/Q8_0/Q4_K_M;词表为 SentencePiece Unigram,GGUF 分词器类型为t5/UGM)。权重许可:Apache-2.0。