
Stambecco는 라마 모델을 기반으로하는 이탈리아 교육을 따르는 모델입니다. 7b 및 13b 매개 변수의 두 가지 버전으로 제공됩니다. 전체 프로젝트는 Google Colab을 사용하여 구축됩니다.
이 저장소에는 이탈리아어로 Stanford Alpaca를 재현하기위한 코드가 포함되어 있습니까? LORA (Low Rank Adaptation)를 사용하여 제공합니까? 포옹 페이스의 PEFT 도서관. 우리는 Raspberry Pi (연구)에서 실행할 수있는 Text-Davinci-003과 유사한 품질의 지시 모델을 제공하며 코드는 13B로 쉽게 확장됩니다.
LLM에 대한 교육 기술의 상태를 발전시키기 위해, 우리는 이탈리아어로 LLM Finetuning에 대한 GPT-4 생성 된 명령어를 사용하려는 첫 번째 시도를 제시합니다. 연구 결과를 살펴보십시오 : GPT-4-LLM
단일 RTX 4090 또는 A100 40GB에서 몇 시간 내에 실행되는 교육 코드 외에도 Gradio를 사용한 그래픽 인터페이스를 통해 Foundation Model 및 Stambecco의 다운로드 및 추론을위한 노트북을 제공합니다.
내가 더 보았다면 그것은 거인의 숄더에 서있는 것입니다. - 이삭 뉴턴
우리는이 인용 으로이 섹션을 시작했습니다. 왜냐하면 우리가 한 모든 일은 강력한 공동체로 인해 가능했고 다른 사람들과 그룹이 한 일로 인해 가능했기 때문입니다. 우리의 작업을 위해, 우리는 주로 Llama, Stanford Alpaca, Alpaca Lora, Cabrita, Cleaned Alpaca 데이터 세트, GPT-4-LLM, Alpaca-Lora-Serve, Chatgpt 및 Hugging Face에 의해 개발 된 작품에 주로 의존합니다. 위대한 일에 감사 드리며 세상과 공유하십시오!
사용 및 라이센스 통지 : Stanford Alpaca와 마찬가지로 Stambecco는 연구 용도로만 의도되고 라이센스가 부여됩니다. 데이터 세트는 NC SA 4.0 (비상업적 사용 만 허용)에 의한 CC이며 데이터 세트를 사용하여 훈련 된 모델은 연구 목적 외부에서 사용해서는 안됩니다.
모델 출력에 편향, 음모, 공격적이거나 부적절하고 잠재적으로 유해한 콘텐츠가 포함될 가능성이 높습니다. 이 모델은 연구 목적으로 만 사용되며 자신의 위험에 따라주의해서 사용해야합니다. 생산 사용은 허용되지 않습니다.
우리는 Alpaca_data_cleaned.json 및 alpaca_gpt4_data.json을 이탈리아에 번역하여 점검을 추가하여 (예 : 텍스트가 코드 인 경우 -> 번역하지 마십시오) 번역의 출력을 최적화했습니다. OpenAI gpt-3.5-turbo 모델을 사용하여 비용을 줄이기 위해 데이터 세트를 변환하는 것이 좋습니다. 이 번역조차도 최고는 아니며 비용과 결과 사이의 상충 관계는있었습니다. 데이터 세트를 구축 한 방법에 대해 더 알고 싶다면 Stanford Alpaca, 청소 된 Alpaca 데이터 세트, GPT-4-LLM으로 이동하십시오.
우리는 포옹 페이스에서 PEFT를 사용하여 라마 모델을 미세 조정했습니다. LLAMA-7B 및 LLAMA-13B 위에 Colab에서 FinetUning을 실행하려면 A100 40GB GPU가 권장됩니다. 교육에 사용되는 데이터 세트는 GPT-4-LLM 데이터 세트의 이탈리아 버전, 모델의 plus 버전에 대한 GPT-4 생성 명령어 데이터의 데이터 세트 및 기본 버전의 MCHL-LABS/STAMBECCO_DATA_IT입니다.
하이퍼 파라미터 훈련에 대한 자세한 내용은 Huggingface의 모델 카드를 참조하십시오.
사용자 통지 : Facebook은 공식 Llama Model Weights 오픈 소스를 만들지 않았지만 Hugging Face Model Library의 decapoda-research/llama-7b-hf 와 같은 다양한 타사 다운로드 링크를 온라인으로 사용할 수 있습니다. 이러한 링크의 사용은 Facebook의 정책을 준수하지 않을 수 있습니다. 위에서 언급 한 이유로 인해 프로젝트는 미세 조정 된 모델의 전체 가중치를 공개 할 수 없습니다. 그러나 LORA 가중치 만 제공 할 수 있으며, 이는 원래 LLAMA 모델의 "패치"로 간주 될 수 있습니다.
미세 조정 된 명령어가 많은 Stambecco 모델을 사용할 수 있습니까? 포옹 얼굴 :
다음 Google Colab 노트북을 사용하여 이러한 모델을 추론 할 수 있습니다.
번역 된 데이터 세트 (stambecco_data_it.json- 이제 Hugging Face의 데이터 세트에도), 모델 (Hugging Face의 허브에서 사용할 수 있음) 및 결과를 재현하기위한 코드를 출시했습니다.
@article{touvron2023llama,
title={LLaMA: Open and Efficient Foundation Language Models},
author={Touvron, Hugo and Lavril, Thibaut and Izacard, Gautier and Martinet, Xavier and Lachaux, Marie-Anne and Lacroix, Timoth{'e}e and Rozi{`e}re, Baptiste and Goyal, Naman and Hambro, Eric and Azhar, Faisal and Rodriguez, Aurelien and Joulin, Armand and Grave, Edouard and Lample, Guillaume},
journal={arXiv preprint arXiv:2302.13971},
year={2023}
}
@misc{selfinstruct,
title={Self-Instruct: Aligning Language Model with Self Generated Instructions},
author={Wang, Yizhong and Kordi, Yeganeh and Mishra, Swaroop and Liu, Alisa and Smith, Noah A. and Khashabi, Daniel and Hajishirzi, Hannaneh},
journal={arXiv preprint arXiv:2212.10560},
year={2022}
}
@misc{alpaca,
author = {Rohan Taori and Ishaan Gulrajani and Tianyi Zhang and Yann Dubois and Xuechen Li and Carlos Guestrin and Percy Liang and Tatsunori B. Hashimoto },
title = {Stanford Alpaca: An Instruction-following LLaMA model},
year = {2023},
publisher = {GitHub},
journal = {GitHub repository},
howpublished = {url{https://github.com/tatsu-lab/stanford_alpaca}},
}
@misc{hu2021lora,
title={LoRA: Low-Rank Adaptation of Large Language Models},
author={Hu, Edward and Shen, Yelong and Wallis, Phil and Allen-Zhu, Zeyuan and Li, Yuanzhi and Wang, Lu and Chen, Weizhu},
year={2021},
eprint={2106.09685},
archivePrefix={arXiv},
primaryClass={cs.CL}
}
@inproceedings{wolf-etal-2020-transformers,
title = "Transformers: State-of-the-Art Natural Language Processing",
author = "Thomas Wolf and Lysandre Debut and Victor Sanh and Julien Chaumond and Clement Delangue and Anthony Moi and Pierric Cistac and Tim Rault and Rémi Louf and Morgan Funtowicz and Joe Davison and Sam Shleifer and Patrick von Platen and Clara Ma and Yacine Jernite and Julien Plu and Canwen Xu and Teven Le Scao and Sylvain Gugger and Mariama Drame and Quentin Lhoest and Alexander M. Rush",
booktitle = "Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing: System Demonstrations",
month = oct,
year = "2020",
address = "Online",
publisher = "Association for Computational Linguistics",
url = "https://www.aclweb.org/anthology/2020.emnlp-demos.6",
pages = "38--45"
}
@Misc{peft,
title = {PEFT: State-of-the-art Parameter-Efficient Fine-Tuning methods},
author = {Sourab Mangrulkar, Sylvain Gugger, Lysandre Debut, Younes Belkada, Sayak Paul},
howpublished = {url{https://github.com/huggingface/peft}},
year = {2022}
}
@article{peng2023gpt4llm,
title={Instruction Tuning with GPT-4},
author={Baolin Peng, Chunyuan Li, Pengcheng He, Michel Galley, Jianfeng Gao},
journal={arXiv preprint arXiv:2304.03277},
year={2023}
}
Stambecco가 귀하와 Stambecco Code, Stambecco 모델 또는 Stambecco 데이터 세트가 연구에 사용된다면 다음과 같이 인용하십시오.
@misc{stambecco,
author = {Michael},
title = {Stambecco: Italian Instruction-following LLaMA Model},
year = {2023},
publisher = {GitHub},
journal = {GitHub repository},
howpublished = {url{https://github.com/mchl-labs/stambecco}},
}