Edit model card

Model Card for Model ID

This model checkpoint is the TinyLlama-1.1B fine-tuned on alpaca dataset.

Model Details

Model Sources

Uses

The use of this model should comply with the restrictions from TinyLlama-1.1b and 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, 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.

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}
}
Downloads last month
7
Safetensors
Model size
1.1B params
Tensor type
F32
·

Dataset used to train luckychao/TinyAlpaca-1.1B