Edit model card

MetaMath Mistral7B Lora fine tuning

This is the LoRa weight fine-tuning version of Meta-Math-Mistral-7B on Vietnamese Elementary Maths Solving

Model Details

Model Description

  • Model type: LoRa(rank = 128, alpha = 256)
  • Languages (NLP): English, Vietnamese
  • Finetuned from model [optional]: meta-math/MetaMath-Mistral-7B

Model Sources [optional]

Uses

  • Instruction with explanation
INS_EXP_PROMPT = '''
You are a helpful assistant in evaluating the quality of the outputs for a given instruction. \
Please propose at most a precise answer about whether a potential output is a good output for a given instruction. \
Another assistant will evaluate different aspects of the output by answering all the questions.

### Instruction:
{question}

### Input:
{choices}

### Rationale:
{explanation}

### Response: {answer}
'''
  • Instruction with no explanation
INS_EXP_PROMPT = '''
You are a helpful assistant in evaluating the quality of the outputs for a given instruction. \
Please propose at most a precise answer about whether a potential output is a good output for a given instruction. \
Another assistant will evaluate different aspects of the output by answering all the questions.

### Instruction:
{question}

### Input:
{choices}

### Response: {answer}
'''
  • Evaluation prompt
INS_PROMPT = '''
You are a helpful assistant in evaluating the quality of the outputs for a given instruction. Please propose at most a precise answer about whether a potential output is a good output for a given instruction. Another assistant will evaluate different aspects of the output by answering all the questions.

### Instruction:
{question}

### Input:
{choices}

### Rationale:
'''

How to Get Started with the Model

Use the code below to get started with the model.

import torch
from peft import PeftModel
from transformers import AutoTokenizer, AutoModelForCausalLM

model_name_or_path = "meta-math/MetaMath-Mistral-7B"
lora_path = "tienda02/metamath-mistral7B-lora"

tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, use_fast=False)
model = AutoModelForCausalLM.from_pretrained(model_name_or_path, device_map='auto')
model = PeftModel.from_pretrained(model, lora_path)
model = model.merge_and_unload()
Downloads last month
0
Unable to determine this model's library. Check the docs .