File size: 1,541 Bytes
deb98c8
 
e486efc
deb98c8
 
b100249
db82463
ec1e7a6
db82463
b100249
5fb859d
fb0c3aa
e486efc
 
 
db82463
e486efc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
fb0c3aa
e486efc
deb98c8
 
b454ae0
939c356
b454ae0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
---
library_name: transformers
license: apache-2.0
---

# Tanuki-8B-dpo-v1.0-twitter-lora-r128-exp1
- Tanuki-8B-dpo-v1.0-ใ‚’ใƒใƒฃใƒƒใƒˆ็‰นๅŒ–ใ•ใ›ใ‚‹ใŸใ‚ใฎ่ฉฆ้จ“ใƒใƒผใ‚ธใƒงใƒณใงใ™๏ฝก
# original model
- [Tanuki-8B-dpo-v1.0-](https://huggingface.co/weblab-GENIAC/Tanuki-8B-dpo-v1.0)

# code
~~~
import transformers

#load model
model_id="weblab-GENIAC/Tanuki-8B-dpo-v1.0"
adapter_id="kanhatakeyama/Tanuki-8B-dpo-v1.0-twitter-lora-r128-exp1"
model=transformers.AutoModelForCausalLM.from_pretrained(model_id,trust_remote_code=True)
tokenizer=transformers.AutoTokenizer.from_pretrained(model_id,)
model.load_adapter(adapter_id)

#talk
pipe=transformers.pipeline("text-generation",model=model,tokenizer=tokenizer)

messages=[
{"role":"user","content":"ๅ…ƒๆฐ—???"},
]
prompt = pipe.tokenizer.apply_chat_template(
    messages, tokenize=False, add_generation_prompt=True)

outputs = pipe(prompt, max_new_tokens=1024,
                temperature=0.7,
                repetition_penalty=1.1,
                )
out_text = outputs[0]["generated_text"].lstrip(prompt)
print(out_text)

#ใ†ใ‚“!ๅ…ƒๆฐ—ใ ใ‚ˆใ€œ๐Ÿ˜Šใ‚ใชใŸใฏใฉใ†?
~~~


### Training Data
- [kanhatakeyama/multiturn-conv-from-aozora-bunko](https://huggingface.co/datasets/kanhatakeyama/multiturn-conv-from-aozora-bunko)
- [kanhatakeyama/twitter-auto_reply (currently private dataset)](https://huggingface.co/datasets/kanhatakeyama/twitter-auto_reply)
- [kanhatakeyama/ramdom-to-fixed-multiturn-Calm3](https://huggingface.co/datasets/kanhatakeyama/ramdom-to-fixed-multiturn-Calm3)