Views
No views yet
| Parameter | Value |
|---|---|
| start_layer_index | 16 |
| end_layer_index | 28 |
| preserve_good_behavior_weight | 0.3326 |
| steer_bad_behavior_weight | 0.0048 |
| overcorrect_relative_weight | 1.0004 |
| neighbor_count | 15 |
| Metric | This model | Original model (llm-jp/llm-jp-4-8b-thinking) |
|---|---|---|
| KL divergence | 0.0129 | 0 (by definition) |
| Refusals | 5/100 | 100/100 |
1import torch
2from transformers import AutoModelForCausalLM, AutoTokenizer
3model_name = "llm-jp/llm-jp-4-8b-thinking"
4tokenizer = AutoTokenizer.from_pretrained(
5 model_name,
6 # trust_remote_code is required to load custom tokenizer and reasoning parser.
7 trust_remote_code=True,
8)
9model = AutoModelForCausalLM.from_pretrained(
10 model_name,
11 dtype=torch.bfloat16,
12 device_map="auto",
13 trust_remote_code=True,
14)
15model.eval()
16messages = [
17 {"role": "user", "content": "自然言語処理とは何か"},
18]
19prompt: str = tokenizer.apply_chat_template(
20 messages,
21 tokenize=False,
22 add_generation_prompt=True,
23 reasoning_effort="medium", # {"low", "medium", "high"}
24)
25inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
26with torch.no_grad():
27 output_tensor = model.generate(
28 **inputs,
29 max_new_tokens=256,
30 do_sample=True,
31 temperature=0.7,
32 top_p=0.9,
33 )
34generated_ids: list[int] = output_tensor[0][inputs["input_ids"].shape[1]:].tolist()
35response = tokenizer.decode(generated_ids)
36parsed = tokenizer.parse_response(response)
37print("\n--- Parsed Response ---")
38print("Role:", parsed.get("role"))
39print("Thinking:", parsed.get("thinking"))
40print("Content:", parsed.get("content"))llm-jp-tokenizer v4.0.
Please refer to README.md of llm-jp-tokenizer for details on the vocabulary construction procedure (the pure SentencePiece training does not reproduce our vocabulary).[!NOTE] The chat template of this model is designed to be compatible with the OpenAI Harmony response format. However, the tokenizer differs from the one assumed by theopenai-harmonylibrary, and therefore direct tokenization withopenai-harmonyis not supported. For correct behavior, please use the tokenizer provided with this model. For detailed usage, please refer to our cookbook.

[!NOTE] Although most of the corpora have been released, some portions are excluded from public release due to licensing constraints.
gpt-5.4-2026-03-05.[!NOTE] Note: In earlier evaluations of the llm-jp-3 series, we usedgpt-4o-2024-08-06. The newer evaluatorgpt-5.4-2026-03-05provides a stricter and more reliable assessment, which results in lower scores on benchmarks such as MT-Bench compared to those reported for the llm-jp-3 series. The scores represent the average values obtained from three rounds of inference and evaluation. For more details, please refer to the codes. | Model Name | MT-Bench (JA) | MT-Bench (EN) | AnswerCarefully | llm-jp-instructions | |:-------------------------------------------------------------------------------------------------------|----:|----:|----------------:|--------------------:| | gpt-4o-2024-08-06 | 7.29 | 7.69 | 4.00 | 4.07 | | gpt-5.4-2026-03-05 (reasoning_effort = low) | 8.87 | 8.76 | 4.38 | 4.79 | | gpt-5.4-2026-03-05 (reasoning_effort = medium) | 8.87 | 8.89 | 4.43 | 4.82 | | gpt-5.4-2026-03-05 (reasoning_effort = high) | 8.98 | 8.85 | 4.41 | 4.83 | | gpt-oss-20b (reasoning_effort = low) | 7.21 | 7.95 | 3.39 | 3.08 | | gpt-oss-20b (reasoning_effort = medium) | 7.33 | 7.85 | 3.55 | 3.16 | | llm-jp-4-8b-thinking (reasoning_effort = low) | 7.23 | 7.54 | 3.58 | 3.50 | | llm-jp-4-8b-thinking (reasoning_effort = medium) | 7.54 | 7.79 | 3.69 | 3.54 | | llm-jp-4-32b-a3b-thinking (reasoning_effort = low) | 7.57 | 7.70 | 3.61 | 3.61 | | llm-jp-4-32b-a3b-thinking (reasoning_effort = medium) | 7.82 | 7.86 | 3.70 | 3.61 |