Downloads · 30 days
0
ryukin777/llm-jp-3-13b-it_33
llm-jp-3-13b-it_33 is a machine learning model from ryukin777. 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.
This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
Downloads · 30 days
0
Access
Public
Updated Dec 17, 2024
Repo size
501 MB
Likes
0
Public
Click a slice to open those files.
.safetensors501 MB · 99%
From the Hugging Face model README
This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
Use the code below to get started with the model.
from unsloth import FastLanguageModel
from peft import PeftModel
from tqdm import tqdm
# ベースとなるモデルと学習したLoRAのアダプタ(Hugging FaceのIDを指定)。
model_id = "llm-jp/llm-jp-3-13b"
adapter_id = "ryukin777/llm-jp-3-13b-it_33"
dtype = None # Noneにしておけば自動で設定
load_in_4bit = True # 今回は13Bモデルを扱うためTrue
model, tokenizer = FastLanguageModel.from_pretrained(
model_name=model_id,
dtype=dtype,
load_in_4bit=load_in_4bit,
trust_remote_code=True,
)
model = PeftModel.from_pretrained(model, adapter_id)
FastLanguageModel.for_inference(model)
input = "LLMとはなんですか?"
prompt = f"""### 指示\n{input} 簡潔に回答してください。\n### 回答\n"""
inputs = tokenizer([prompt], return_tensors = "pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens = 512, use_cache = True, do_sample=False, repetition_penalty=1.2)
prediction = tokenizer.decode(outputs[0], skip_special_tokens=True).split('\n### 回答')[-1]
print('prediction')
SFT
Ichikara datasets ELyza tasks100 https://huggingface.co/datasets/DeL-TaiseiOzaki/Tengentoppa-sft-v1.0