Downloads · 30 days
8
2% of all-time downloads
sudy-super/baku-10b-chat-v2
baku-10b-chat-v2 is a text generation model from sudy-super. 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 model is a 10.2 billion parameter model that combines two sets of 24 layers each from CALM2-7B-chat using slerp-merge.
Downloads · 30 days
8
2% of all-time downloads
All-time downloads
324
Public
Repo size
41 GB
Likes
2
Public
Click a slice to open those files.
.bin20.5 GB · 100%
From the Hugging Face model README
This model is a 10.2 billion parameter model that combines two sets of 24 layers each from CALM2-7B-chat using slerp-merge.
USER: {user_message1}
ASSISTANT: {assistant_message1}<|endoftext|>
USER: {user_message2}
ASSISTANT: {assistant_message2}<|endoftext|>
USER: {user_message3}
ASSISTANT: {assistant_message3}<|endoftext|>
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
tokenizer = AutoTokenizer.from_pretrained("sudy-super/baku-10b-chat-v2")
model = AutoModelForCausalLM.from_pretrained("sudy-super/baku-10b-chat-v2", device_map="auto", torch_dtype=torch.bfloat16)
raw_prompt = "仕事の熱意を取り戻すためのアイデアを5つ挙げてください。"
prompt = f"USER:{raw_prompt}\nASSISTANT:"
token_ids = tokenizer.encode(prompt, add_special_tokens=False, return_tensors="pt")
with torch.no_grad():
output_ids = model.generate(
token_ids.to(model.device),
max_new_tokens=100,
do_sample=True,
temperature=0.8,
pad_token_id=tokenizer.pad_token_id,
bos_token_id=tokenizer.bos_token_id,
eos_token_id=tokenizer.eos_token_id
)
result = tokenizer.decode(output_ids.tolist()[0])
print(result)