elyza/ELYZA-tasks-100
Viewer โข Updated โข 100 โข 2.32k โข 99
How to use tokutsu/llm-jp-3-13b-it with Transformers:
# Load model directly
from transformers import AutoModel
model = AutoModel.from_pretrained("tokutsu/llm-jp-3-13b-it", dtype="auto")How to use tokutsu/llm-jp-3-13b-it with Unsloth Studio:
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for tokutsu/llm-jp-3-13b-it to start chatting
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for tokutsu/llm-jp-3-13b-it to start chatting
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for tokutsu/llm-jp-3-13b-it to start chatting
pip install unsloth
from unsloth import FastModel
model, tokenizer = FastModel.from_pretrained(
model_name="tokutsu/llm-jp-3-13b-it",
max_seq_length=2048,
)This is a fine-tuned llm-jp-3-13b-it model for ELYZA-tasks-100. The model was trained on ELYZA-tasks-100 and the ichikara-instruction dataset.
Load the model and tokenizer with the following code:
from unsloth import FastLanguageModel
model_id = "tokutsu/llm-jp-3-13b-it"
model, tokenizer = FastLanguageModel.from_pretrained(
model_name=model_id,
dtype=None,
load_in_4bit=True,
)
FastLanguageModel.for_inference(model)
prompt = """### ๆ็คบ
ไปไบใฎ็ฑๆใๅใๆปใใใใฎใขใคใใขใ5ใคๆใใฆใใ ใใใ
### ๅ็ญ
"""
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]
Here is an example of what the output would look like:
1. ไปไบใซ้ข้ฃใใ่ถฃๅณใๆใค: ่ถฃๅณใฏในใใฌใน่งฃๆถใใชใฉใใฏในๅนๆใใใใไปไบใธใฎใขใใใผใทใงใณใขใใใซใใคใชใใใพใใไพใใฐใใฌใผใใใณใฐใๅฅฝใใชใใชใใฃในใง่ฆณ่ๆค็ฉใ่ฒใฆใใใๆ็ใๅพๆใงใใใฐๅๅใจใฉใณใไผใใใใชใฉใ่ชๅใชใใฎไปไบใจใฎๆฅ็นใ่ฆใคใใฆใฟใพใใใใ
2. ็ฎๆจ่จญๅฎใ่กใ: ้ๆๅฏ่ฝใช็ฎๆจใ็ซใฆใใใจใงใๆฅใ
ๆ้ทใใฆใใใใจใๅฎๆใงใใใใใใใ็ใพใใฆใใพใใใพใใๅฎๆ็ใซ้ฒๆ็ถๆณใ็ขบ่ชใใใใจใงใ้ๆๆใจใจใใซใใใชใใใๆฐใซใคใชใใใงใใใใ
3. ๅๅใใกใจไบคๆตใใ: ่ทๅ ดใงใฎไบบ้้ขไฟใฏใไปไบใซๅฏพใใๆ
็ฑใ็ถญๆใใใใใซ้่ฆใงใใใณใใฅใใฑใผใทใงใณใใจใใใจใงใใไบใใฎใใจใ็่งฃใใๅฉใๅใใใจใใงใใพใใ่ทๅ ดใฎใคใใณใใซๅๅ ใใใใไผๆฉๆ้ใซใฏ้่ซใใใใใฆใ็ฉๆฅต็ใซๅจใใฎไบบใจ้ขใใใพใใใใ
4. ๆฐใใในใญใซใ่บซใซใคใใ: ในใญใซๅไธใฎใใใฎๅๅผทใใๆฐใใ่ณๆ ผๅๅพใชใฉใซใใใ่ชๅใฎ่ฝๅใ้ซใใใใจใใงใใพใใ่ชๅทฑๅ็บ็ใชๆดปๅใใ่ชไฟกใๅไธๅฟใธใจใคใชใใใใใใใพใใใ
5. ไผๆใใจใฃใฆใชใใฌใใทใฅใใ: ้ทๆไผๆใใจใใๅฟ่บซใจใใซไผๆฏใใใใจใฏๅคงๅใชใใจใงใใๆ
่กใธ่กใฃใใใๅฎถๆใจไธ็ทใซ้ใใใใใใใใจใงๆฐๅ่ปขๆใใงใใใพใๆฐใใชๆฐๆใกใงไปไบใซๅใ็ตใใใจใใงใใใใใซใชใใพใใ
The model was trained using LoRA with the following specifications:
llm-jp/llm-jp-3-13b.This model is licensed under the CC BY-NC-SA 4.0 License. For more details, see the LICENSE file in this repository.
This model was developed as part of the LLM course 2024 exercises conducted by the Matsuo-Iwasawa Lab at the University of Tokyo.
Base model
llm-jp/llm-jp-3-13b