Downloads · 30 days
47
4% of all-time downloads
DeL-TaiseiOzaki/Tengentoppa-llm-jp-13B-base
Tengentoppa-llm-jp-13B-base is a text generation model from DeL-TaiseiOzaki. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
This is an enhanced version of llm-jp-13B with an extended tokenizer that includes additional special tokens for structured conversations and advanced prompting.
Downloads · 30 days
47
4% of all-time downloads
All-time downloads
1.3K
Public
Parameters
13.7B
27.4 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors27.4 GB · 100%
From the Hugging Face model README
This is an enhanced version of llm-jp-13B with an extended tokenizer that includes additional special tokens for structured conversations and advanced prompting.

{token_config.unk_token}{token_config.bos_token}{token_config.eos_token}{token_config.pad_token}{token_config.cls_token}{token_config.sep_token}{token_config.mask_token}{token_config.system_token} and {token_config.system_end_token}{token_config.user_token} and {token_config.user_end_token}{token_config.assistant_token} and {token_config.assistant_end_token}{token_config.reasoning_token} and {token_config.reasoning_end_token}{token_config.solution_token} and {token_config.solution_end_token}{token_config.response_token} and {token_config.response_end_token}{token_config.hint_token} and {token_config.hint_end_token}{token_config.note_token} and {token_config.note_end_token}{token_config.context_token} and {token_config.context_end_token}{token_config.reference_token} and {token_config.reference_end_token}{token_config.example_token} and {token_config.example_end_token}{token_config.important_token} and {token_config.important_end_token}{token_config.warning_token} and {token_config.warning_end_token}{token_config.error_token} and {token_config.error_end_token}このモデルは以下の役割(roles)をサポートしています:
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained("{model_name}")
tokenizer = AutoTokenizer.from_pretrained("{model_name}")
# チャット形式での使用例
messages = [
{
"role": "system",
"content": "あなたは親切で有能なAIアシスタントです。"
},
{
"role": "user",
"content": "次の数学の問題を解いてください:2x + 3 = 7"
},
{
"role": "hint",
"content": "方程式を解くときは、まず両辺から数を移項することを考えてみましょう。"
},
{
"role": "reasoning",
"content": "この方程式を解くために以下のステップで考えます:\\n1. 3を両辺から引く\\n2. 両辺を2で割る"
},
{
"role": "assistant",
"content": "x = 2 が方程式の解です。"
}
]
# チャットテンプレートを使用してメッセージを整形
prompt = tokenizer.apply_chat_template(messages, tokenize=False)
print("\\nGenerated prompt:\\n", prompt)
# トークン化と推論
inputs = tokenizer(prompt, return_tensors="pt", max_length=2048, truncation=True)
outputs = model.generate(**inputs, max_length=2048, temperature=0.7)
response = tokenizer.decode(outputs[0])
print("\\nModel response:\\n", response)
messages = [ { "role": "system", "content": "あなたは数学の専門家です。" }, { "role": "user", "content": "二次方程式 x² - 4x + 4 = 0 を解いてください。" } ]
prompt = tokenizer.apply_chat_template( messages, tokenize=False, add_generation_prompt=False )
prompt += "\n<|HINT|>因数分解を使うと簡単に解けるかもしれません。</|HINT|>"
prompt += "\n<|REASONING|>1. この式は(x-2)²の形に似ています\n2. 実際に展開すると同じ式になります</|REASONING|>"
prompt += "\n<|ASSISTANT|>"
inputs = tokenizer(prompt, return_tensors="pt", max_length=2048, truncation=True)
## Chat Template Specification
モデルのチャットテンプレートは以下の要素を含みます:
- 5つの異なるロール(system, user, hint, reasoning, assistant)
- 各ロールに対応する特殊トークン
- デフォルトのシステムメッセージ
- 柔軟なテンプレート構造
特徴:
- メッセージの順序は保持されます
- 各ロールは明確に区別されます
- システムメッセージは任意です
- ヒントと推論は必要に応じて追加できます
## Additional Notes
### トークナイザーの拡張について
- 元のトークナイザーの全機能を保持
- 新しい特殊トークンの追加による機能拡張
- チャットテンプレートによる構造化された会話のサポート
### 使用上の注意
- 特殊トークンは必要な場合にのみ使用してください
- チャットテンプレートは柔軟に調整可能です
- システムメッセージは対話の文脈に応じてカスタマイズできます