Skip to content

ArtificialZeng/Baichuan2-Explained

Repository files navigation

Baichuan2-Explained

Baichuan2代码的逐行解析版本,适合小白

  • fine-tune/

    • fine-tune.py/
      • class ModelArguments : const model_name_or_path
      • class DataArguments : const data_path
      • class TrainingArguments : const cache_dir、const optim、const model_max_length、 const use_lora、
      • class SupervisedDataset
    • func train
  • web_demo.py/

  • ./Baichuan2-13B-Chat/modelling_baichuan.py

    • const logger
    • func _get_interleave
    • func _get_interleave_power_of_2
    • func _fill_with_neg_inf
    • func _buffered_future_mask
    • func _gen_alibi_mask
    • class RMSNorm
      • func init
      • func forward
    • class MLP
      • func init
      • func init
      • func _shape
      • func forward
    • class BaichuanLayer
      • func init
      • func forward
    • class BaichuanPreTrainedModel
  • README.md

CSDN彩色博客版:

ChatGLM Efficient Tuning源码解析train_sft.py https://zengxiaojian.blog.csdn.net/article/details/131458667

引用 - 源项目

@Misc{Baichuan2,
  title = {Baichuan2},
  author = {Baichuan2},
  howpublished = {\url{https://github.com/baichuan-inc/Baichuan2}},
  year = {2023}
}

About

Baichuan2代码的逐行解析版本,适合小白

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages