Cornucopia-LLaMA-Fin-Chinese  by jerry1993-tech

Chinese finance LLM fine-tuning project, LoRA weights for LLaMA

created 2 years ago
639 stars

Top 52.9% on sourcepulse

GitHubView on GitHub
Project Summary

Cornucopia-LLaMA-Fin-Chinese provides instruction-tuned LLaMA models fine-tuned on Chinese financial knowledge. It targets users needing improved LLaMA performance in the financial domain, offering open-source, commercially usable models and a lightweight training framework.

How It Works

The project fine-tunes LLaMA-based models using instruction datasets derived from Chinese financial Q&A data, including publicly available and scraped sources. This approach aims to enhance LLaMA's capabilities in financial question answering by leveraging curated financial domain data and instruction-following techniques. Future work includes expanding datasets with GPT-4 and knowledge graphs for multi-task SFT and RLHF.

Quick Start & Requirements

  • Install dependencies: pip install -r requirements.txt
  • Install Git LFS for model downloads.
  • Download LLaMA base models using ./base_models/load.sh.
  • Inference scripts: ./scripts/infer.sh (single model), ./scripts/comparison_test.sh (multi-model).
  • Finetuning script: ./scripts/finetune.sh (requires data in ./instruction_data/fin_data.json format).
  • Python 3.9+ recommended.

Highlighted Details

  • Offers LoRA weights for fine-tuned models based on decapoda-research/llama-7b-hf (V1.0) and Linly-AI/Chinese-LLaMA-7B (V1.1).
  • Training requires significant GPU resources (e.g., A100-80GB) or high-end consumer GPUs (3090/4090 with 24GB VRAM) for batch sizes of 64-96.
  • Demonstrates performance comparisons against original LLaMA, Wenxin Yiyan, and SparkDesk on financial Q&A tasks.
  • Includes a comprehensive dataset construction methodology, with plans to use GPT-3.5/4.0 for further data enhancement.

Maintenance & Community

  • Developed by Yangmu Yu and Wenhuan Hong from the Chinese Academy of Sciences, Chengdu Institute of Computer Applications.
  • References include LLaMA, Stanford Alpaca, alpaca-lora, and Huatuo-Llama-Med-Chinese.
  • Future development includes multi-task SFT, CUDA deployment, RLHF, and next-pretraining for Chinese financial domains.

Licensing & Compatibility

  • Code License: Apache 2.0.
  • Model weights are for academic research only and strictly prohibited for commercial use.

Limitations & Caveats

The project explicitly states that model resources are for academic research only and strictly prohibited for commercial use. The accuracy of model-generated content is not guaranteed due to computational factors, randomness, and quantization precision loss. Outputs should not be considered investment advice.

Health Check
Last commit

2 years ago

Responsiveness

1 week

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

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of AI Engineering, Designing Machine Learning Systems), Jeff Hammerbacher Jeff Hammerbacher(Cofounder of Cloudera), and
3 more.

LLaMA-Adapter by OpenGVLab

0.0%
6k
Efficient fine-tuning for instruction-following LLaMA models
created 2 years ago
updated 1 year ago
Starred by Andrej Karpathy Andrej Karpathy(Founder of Eureka Labs; Formerly at Tesla, OpenAI; Author of CS 231n), John Yang John Yang(Author of SWE-bench, SWE-agent), and
13 more.

stanford_alpaca by tatsu-lab

0.1%
30k
Instruction-following LLaMA model training and data generation
created 2 years ago
updated 1 year ago
Feedback? Help us improve.