Downloads · 30 days
12
6% of all-time downloads
ntseng/mistralai_Mistral-7B-Instruct-v0_2_student_answer_train_examples_mistral_0416
mistralai_Mistral-7B-Instruct-v0_2_student_answer_train_examples_mistral_0416 is a text generation model from ntseng. Use it when you need the model to write or continue text. It is set up for peft.
LoRAs weights for Mistral-7b-Instruct-v02
Downloads · 30 days
12
6% of all-time downloads
All-time downloads
201
Public
Repo size
1.3 GB
Likes
0
Public
Click a slice to open those files.
.safetensors1.3 GB · 100%
From the Hugging Face model README
reduced training hyperparams: epochs=3 (previously 4)
new training prompt: "Teenager students write in simple sentences. You are a teenager student, and please answer the following question. {training example}"
old training prompt: "Teenager students write in simple sentences [with typos and grammar errors]. You are a teenager student, and please answer the following question. {training example}"
Fine-tuned model that talks like middle school students, using simple vocabulary and grammar.
Fine-tuned model to talk like middle school students, using typos/grammar errors. Trained on student Q&As physics topics including pulley/ramp examples that discuss work, force, and etc.
from peft import PeftModel # for fine-tuning
from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline, GenerationConfig, GPTQConfig, BitsAndBytesConfig
model_name_or_path = "mistralai/Mistral-7B-Instruct-v0.2"
nf4_config = BitsAndBytesConfig( # quantization 4-bit
load_in_4bit=True,
bnb_4bit_quant_type="nf4",
bnb_4bit_use_double_quant=True,
bnb_4bit_compute_dtype=torch.bfloat16
)
model = AutoModelForCausalLM.from_pretrained(model_name_or_path,
device_map="auto",
trust_remote_code=False,
quantization_config=nf4_config,
revision="main")
tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True)
lora_model_path = "{path_to_loras_folder}/mistralai_Mistral-7B-Instruct-v0.2-testgen-LoRAs" # load loras
model = PeftModel.from_pretrained(
model, lora_model_path, torch_dtype=torch.float16, force_download=True,
)
Trained on raw text file
[More Information Needed]
[More Information Needed]
[More Information Needed]
[More Information Needed]