ChatGLM-LLaMA-chinese-insturct  by 27182812

Fine-tuning exploration for ChatGLM, LLaMA on Chinese instruction data

created 2 years ago
390 stars

Top 74.7% on sourcepulse

GitHubView on GitHub
Project Summary

This repository explores the fine-tuning performance of Chinese instruction data on large language models like ChatGLM and LLaMA. It targets researchers and developers interested in adapting LLMs for Chinese language tasks, offering insights into model behavior and resource-efficient fine-tuning techniques.

How It Works

The project leverages Parameter-Efficient Fine-Tuning (PEFT) methods, specifically LoRA, to reduce computational resource requirements during the fine-tuning process. It builds upon existing models like ChatGLM-6B and LLaMA, applying Chinese instruction datasets to enhance their capabilities in understanding and generating Chinese text.

Quick Start & Requirements

  • Install: conda env create -f env.yml -n bab followed by conda activate bab and pip install git+https://github.com/huggingface/peft.git.
  • Prerequisites: Python, Conda environment, Hugging Face PEFT library.
  • Data Processing: Run dataprocess.sh.
  • Fine-tuning: Use finetune.sh for ChatGLM-6B or python test_llama1.py for LLaMA-7B.
  • Inference: Use python infer.py for ChatGLM-6B or python generate_llama1.py for LLaMA-7B.

Highlighted Details

  • Fine-tuned ChatGLM-6B and LLaMA-7B models on Chinese instruction datasets.
  • Explores the impact of different fine-tuning epochs on ChatGLM-6B performance.
  • Notes that LLaMA-7B's Chinese performance is weaker but improved with Chinese vocabulary expansion and fine-tuning.
  • Requires merging LoRA weights for LLaMA-7B to generate full-parameter models after vocabulary expansion.

Maintenance & Community

The project is based on ChatGLM-6B, ChatGLM-Tuning, and Aplaca-LoRA. Specific contributor or community links are not provided in the README.

Licensing & Compatibility

The repository's licensing is not explicitly stated in the provided README. Compatibility for commercial use or closed-source linking is therefore undetermined.

Limitations & Caveats

LLaMA-7B's performance on Chinese tasks is noted as inferior to ChatGLM-6B, even after fine-tuning. The project mentions potential repetitive generation issues that may require parameter tuning or post-processing.

Health Check
Last commit

2 years ago

Responsiveness

1 day

Pull Requests (30d)
0
Issues (30d)
0
Star History
0 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.