Downloads · 30 days
0
Reza8848/MUFFIN-Llama2-lora-13B
MUFFIN-Llama2-lora-13B is a machine learning model from Reza8848. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
<img src="https://cdn-uploads.huggingface.co/production/uploads/6434a6e8ea46c009904c617e/J4FHXmtM6TuRnN3aL06y.png" width="38" height="38"
Downloads · 30 days
0
Access
Public
Updated Apr 4, 2024
Repo size
52.5 MB
Likes
1
Public
Click a slice to open those files.
.safetensors52.5 MB · 100%
From the Hugging Face model README
This is the Llama2 LoRA weight that was fine-tuned on MUFFIN (Multi-Faceted Instructions).
We fine-tune the Llama2-13B on MUFFIN dataset with LoRA (low-rank adaption).
We released the LoRA weights of both Llama2 7B and 13B models:
| Model | LoRA Target Modules |
|---|---|
| MUFFIN-Llama2-7B | Q, K, V, O |
| MUFFIN-Llama2-13B | Q, K, V, O |
You can also find the T5-based models here.
We use Alpaca-lora as our fine-tuning code.
So, when adopting the released model weights for inference, it should be better to use the generation code of Alpaca-lora to reproduce our performance.
Please follow the document of Alpaca-lora to set up the correct Python environments first.
Our released lora weights are in
.safetensorsformat rather than the common.bintorch model files. Wrong transformers and torch versions may result in PEFT compatibility errors when using the released lora weighs.
Please use the following prompt template (save the following dict as a JSON file under 'template' folder):
{
"description": "Template used by muffin.",
"prompt_input": "### Input:\n{input}\n\n### Instruction:\n{instruction}\n\n### Response:\n",
"prompt_no_input": "### Input:\nNone\n\n### Instruction:\n{instruction}\n\n### Response:\n",
"response_split": "### Response:"
}
We use the default generation hyper-parameters as identified in this line.
Besides, be aware of the following hyper-parameters:
max_input_len == 1024. This is the max_input_len of training. But it's fine to use any length in the inference since our evaluation batch size is 1.num_beams == 1. In our experiments, we set beam size to 1. But we recommend you try with a larger beam size to get better responses from models.tokenizer.padding_side = "left" , as we left padded all the batched instances when doing tuning (though it shall not have a big impact on the inference results).We use the metric calculation scripts of Tk-Instruct (i.e., ROUGE-L and Exact-Match).
Please kindly cite our paper if you use any resources in this repository:
@inproceedings{Lou2023MUFFIN,
title={{MUFFIN}: Curating Multi-Faceted Instructions for Improving Instruction Following},
author={Renze Lou and Kai Zhang and Jian Xie and Yuxuan Sun and Janice Ahn and Hanzi Xu and Yu su and Wenpeng Yin},
booktitle={The Twelfth International Conference on Learning Representations},
year={2024},
url={https://openreview.net/forum?id=1vrS1zwekw}
}