
Stambecco是一種基於Llama模型的意大利指令遵循模型。它有兩個版本:7b和13b參數。整個項目都是使用Google Colab構建的。
該存儲庫包含用於在意大利語中復制斯坦福羊駝的代碼?使用提供的低級適應(LORA)?擁抱臉的peft圖書館。我們提供了與文本davinci-003相似的指示模型,該模型可以在Raspberry Pi上運行(用於研究),並且該代碼很容易擴展到13B。
為了推進LLM的教學教學技術的狀態,我們提出了首次嘗試使用GPT-4生成的指令數據以LLM Fineting在意大利語中。看看研究結果:GPT-4-LLM
除了在單個RTX 4090或A100 40GB上運行的訓練代碼外,我們還提供了使用Gradio的圖形接口下載和推斷基礎模型和Stambecco的筆記本。
如果我進一步看到,那就是站在巨人的害蟲上。 - 艾薩克·牛頓(Isaac Newton)
我們以此引用開始了這一部分,因為我們所做的一切都是由於社區的強大而做出的,並且其他人和團體都做到了。在我們的工作中,我們主要依靠:Llama,Stanford羊駝,羊駝Lora,Cabrita,Cleaned Alpaca DataSet,GPT-4-LLM,羊駝毛 - 洛拉 - 索爾帕卡 - 索爾帕卡,Chatgpt,Chatgpt和Hugging Face。因此,感謝大家的出色工作,並與世界分享!
用法和許可聲明:與斯坦福羊駝相同,Stambecco僅用於研究用途和許可。數據集由NC SA 4.0(僅允許非商業用途)為CC,並且不應在研究目的之外使用使用數據集進行培訓的模型。
請注意,模型輸出很有可能包含有偏見,陰謀家,令人反感或其他不適當且可能有害的內容。該模型僅用於研究目的,應謹慎使用自己的風險。不允許生產使用。
我們將alpaca_data_cleaned.json和alpaca_gpt4_data.json轉換為意大利語,添加檢查(例如,如果文本為代碼 - >不要翻譯它)以優化翻譯的輸出。我們建議使用OpenAI gpt-3.5-turbo模型來翻譯數據集以降低成本。即使是這種翻譯也不是最好的,成本和結果之間的權衡是。如果您想了解更多有關數據集的構建方式的更多信息,請參閱:Stanford羊駝,清潔羊駝數據集,GPT-4-LLM。
我們使用擁抱臉的PEFT對美洲駝模型進行了挑戰。為了在Llama-7B和Llama-13B上運行COLAB上的Finetuning,建議使用A100 40GB GPU。用於培訓的數據集是Italian版本的GPT-4-LLM數據集,該數據集是該模型的plus的GPT-4生成的指令遵循數據的數據集,以及基本版本的MCHL-LABS/Stambecco_data_it。
有關培訓超參數的更多信息,請參見Huggingface上的型號卡。
用戶注意:Facebook尚未使官方的Llama模型權重開源,儘管可以在線提供各種第三方下載鏈接,例如在擁抱面部模型庫中的decapoda-research/llama-7b-hf 。應該注意的是,使用這些鏈接可能不符合Facebook的政策。由於上述原因,該項目無法釋放微調模型的完整權重。但是,只能提供Lora重量,可以將其視為原始Llama模型的“補丁”。
可以使用微調的指令跟踪Stambecco型號嗎?擁抱臉:
您可以使用以下Google COLAB筆記本來推斷這些模型。
我們發布了一個翻譯的數據集(Stambecco_data_it.json-現在也在擁抱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代碼,您的研究中使用了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}},
}