Downloads · 30 days
0
cuticle999/llm-jp-13b-finetune-stf
llm-jp-13b-finetune-stf is a machine learning model from cuticle999. 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.
松尾研大規模言語モデル講座2024のコンペ用の提出モデル作成の一環として作成・公開しています。
Downloads · 30 days
0
Access
Public
Updated Dec 23, 2024
Repo size
250 MB
Likes
0
Public
Click a slice to open those files.
.safetensors250 MB · 98%
From the Hugging Face model README
松尾研大規模言語モデル講座2024のコンペ用の提出モデル作成の一環として作成・公開しています。
モデル<br> https://huggingface.co/llm-jp/llm-jp-3-13b<br>
こちらのデータセットを使用してファインチューニングを行っています。<br> https://huggingface.co/datasets/llm-jp/magpie-sft-v1.0
!pip install torch transformers accelerate bitsandbytes import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("llm-jp/llm-jp-3-13b")
model = AutoModelForCausalLM.from_pretrained("llm-jp/llm-jp-3-13b", device_map="auto", torch_dtype=torch.bfloat16)
text = "自然言語処理とは何か"
tokenized_input = tokenizer.encode(text, add_special_tokens=False, return_tensors="pt").to(model.device)
with torch.no_grad():
output = model.generate(
tokenized_input,
max_new_tokens=100,
do_sample=True,
top_p=0.95,
temperature=0.7,
repetition_penalty=1.05,
)[0]
print(tokenizer.decode(output))
ライセンス 本モデルは学習に利用したデータの関係で以下のライセンスの影響を受けます。 https://huggingface.co/llm-jp/llm-jp-13b-v1.0<br> https://huggingface.co/datasets/llm-jp/magpie-sft-v1.0<br>