NilanE/ParallelFiction-Ja_En-100k
Viewer • Updated • 106k • 273 • 81
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:
# Load model directly
from transformers import AutoModel
model = AutoModel.from_pretrained("mpasila/JP-EN-Translator-1K-steps-LoRA-7B", dtype="auto")How to use mpasila/JP-EN-Translator-1K-steps-LoRA-7B 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 mpasila/JP-EN-Translator-1K-steps-LoRA-7B 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 mpasila/JP-EN-Translator-1K-steps-LoRA-7B to start chatting
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for mpasila/JP-EN-Translator-1K-steps-LoRA-7B to start chatting
pip install unsloth
from unsloth import FastModel
model, tokenizer = FastModel.from_pretrained(
model_name="mpasila/JP-EN-Translator-1K-steps-LoRA-7B",
max_seq_length=2048,
)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