Tanuki-8B-dpo-v1.0-twitter-lora-r128-exp1
- Tanuki-8B-dpo-v1.0-をチャット特化させるための試験バージョンです。
original model
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