File size: 2,213 Bytes
78e1c06 f16a0a4 78e1c06 9503510 78e1c06 f16a0a4 78e1c06 2130e11 78e1c06 2130e11 78e1c06 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
---
language:
- en
datasets:
- tatsu-lab/alpaca
---
# Model Card for Model ID
This model checkpoint is the TinyLlama-1.1B fine-tuned on [alpaca dataset](https://huggingface.co/datasets/tatsu-lab/alpaca).
## Model Details
### Model Sources
<!-- Provide the basic links for the model. -->
- **Repository:** https://github.com/jzhang38/TinyLlama
- **Paper:** [https://arxiv.org/abs/2404.02406]
## Uses
The use of this model should comply with the restrictions from [TinyLlama-1.1b](https://github.com/jzhang38/TinyLlama) and
[Stanford Alpaca](https://github.com/tatsu-lab/stanford_alpaca).
## How to Get Started with the Model
Use the code below to get started with the model.
```
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("luckychao/TinyAlpaca-1.1B")
model = AutoModelForCausalLM.from_pretrained("luckychao/TinyAlpaca-1.1B")
```
## Training Details
### Training Data
We use the [alpaca dataset](https://huggingface.co/datasets/tatsu-lab/alpaca), which is created by researchers from Stanford University.
### Training Procedure
We follow the same training procedure and mostly same hyper-parameters to fine-tune the original Alpaca model on Llama. The procedure can be found in [stanford_alpaca project](https://huggingface.co/datasets/tatsu-lab/alpaca).
#### Training Hyperparameters
```
--num_train_epochs 3 \
--per_device_train_batch_size 2 \
--per_device_eval_batch_size 2 \
--gradient_accumulation_steps 4 \
--evaluation_strategy "no" \
--save_strategy "steps" \
--save_steps 1000 \
--save_total_limit 1 \
--learning_rate 2e-5 \
--weight_decay 0. \
--warmup_ratio 0.03 \
--lr_scheduler_type "cosine" \
--logging_steps 1 \
--bf16 True \
--fsdp "full_shard auto_wrap" \
--fsdp_transformer_layer_cls_to_wrap 'LlamaDecoderLayer' \
--model_max_length 2048
```
## Citation
The model is mostly developed for the paper below. Please cite it if you find the repository helpful.
**BibTeX:**
```
@article{hao2024exploring,
title={Exploring Backdoor Vulnerabilities of Chat Models},
author={Hao, Yunzhuo and Yang, Wenkai and Lin, Yankai},
journal={arXiv preprint arXiv:2404.02406},
year={2024}
}
```
|