Views
No views yet
| Params | Layers | Hidden size | Intermediate size | Attention Heads | KV Heads | Context length | Rope Theta |
|---|---|---|---|---|---|---|---|
| 8b | 32 | 4096 | 14336 | 32 | 8 | 8192 | 500000 |
1import torch
2from transformers import AutoTokenizer, AutoModelForCausalLM
3tokenizer = AutoTokenizer.from_pretrained("hatakeyama-llm-team/Tanuki-8B-Instruct")
4model = AutoModelForCausalLM.from_pretrained("hatakeyama-llm-team/Tanuki-8B-Instruct", torch_dtype=torch.bfloat16).to('cuda')
5chat = [
6 {"role": "system", "content": "以下は、タスクを説明する指示と、文脈のある入力の組み合わせです。要求を適切に満たす応答を書きなさい。"},
7 {"role": "user", "content": "たぬきってなんですか?"},
8]
9tokenized_input = tokenizer.apply_chat_template(chat, add_generation_prompt=True, tokenize=True, return_tensors="pt").to(model.device)
10with torch.no_grad():
11 output = model.generate(
12 tokenized_input,
13 max_new_tokens=256,
14 do_sample=True,
15 temperature=0.7,
16 repetition_penalty=1.05,
17 )[0]
18print(tokenizer.decode(output))| Model Variant |
|---|
| Instruction models |
| hatakeyama-llm-team/Tanuki-8B-Instruct |
| hatakeyama-llm-team/Tanuki-8B-Instruct-without-DPO |
| Pre-trained models |
| Tanuki-8B |
| Tanuki-8B-Before-Context-Length-Extension |