Downloads · 30 days
0
kanhatakeyama/EZO-Common-9B-gemma-2-it-twitter-lora-r256-exp1
EZO-Common-9B-gemma-2-it-twitter-lora-r256-exp1 is a machine learning model from kanhatakeyama. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as gemma.
- AXCXEPT/EZO-Common-9B-gemma-2-itをチャット特化させるための試験バージョンです。 - AXCXEPT/EZO-Common-9B-gemma-2-it
Downloads · 30 days
0
Access
Public
Updated Oct 4, 2024
Repo size
3.5 GB
Likes
1
Public
Click a slice to open those files.
.safetensors3.5 GB · 100%
From the Hugging Face model README
import transformers
#load model
model_id="AXCXEPT/EZO-Common-9B-gemma-2-it"
adapter_id="kanhatakeyama/EZO-Common-9B-gemma-2-it-twitter-lora-r256-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)