NilanE/ParallelFiction-Ja_En-100k
Viewer • Updated • 106k • 113 • 82
How to use mpasila/JP-EN-Translator-1K-steps-LoRA-7B with PEFT:
from peft import PeftModel
from transformers import AutoModelForCausalLM
base_model = AutoModelForCausalLM.from_pretrained("augmxnt/shisa-base-7b-v1")
model = PeftModel.from_pretrained(base_model, "mpasila/JP-EN-Translator-1K-steps-LoRA-7B")How to use mpasila/JP-EN-Translator-1K-steps-LoRA-7B with Transformers:
# pip install -U transformers accelerate
# Load model directly
from transformers import AutoModel
model = AutoModel.from_pretrained("mpasila/JP-EN-Translator-1K-steps-LoRA-7B", device_map="auto")Experimental LoRA, may not be super good. Dataset used is a modified version of NilanE/ParallelFiction-Ja_En-100k.
Next version should be better (I'll use a GPU with more memory since the dataset happens to use pretty long samples).
Below is a translation task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
{}
### Input:
{}
### Response:
{}
This mistral model was trained 2x faster with Unsloth and Huggingface's TRL library.
Base model
augmxnt/shisa-base-7b-v1