Instructions to use roberthsu2003/llama3.2_3B_Instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use roberthsu2003/llama3.2_3B_Instruct with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("roberthsu2003/llama3.2_3B_Instruct", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Unsloth Desktop
|
Download README.md from roberthsu2003/llama3.2_3B_Instruct: direct link, hf CLI and curl.
- Browser
- Download file 2.3 kB
-
https://huggingface.co/roberthsu2003/llama3.2_3B_Instruct/resolve/main/README.md
- Command line
-
hf download hf://roberthsu2003/llama3.2_3B_Instruct/README.md
-
curl -L -o README.md https://huggingface.co/roberthsu2003/llama3.2_3B_Instruct/resolve/main/README.md
2.3 kB
| base_model: unsloth/llama-3.2-3b-instruct-unsloth-bnb-4bit | |
| library_name: transformers | |
| model_name: llama3.2_3B_Instruct | |
| tags: | |
| - generated_from_trainer | |
| - unsloth | |
| - trl | |
| - sft | |
| licence: license | |
| datasets: | |
| - roberthsu2003/for_llama3_Instruct | |
| language: | |
| - zh | |
| # Model Card for llama3.2_3B_Instruct | |
| This model is a fine-tuned version of [unsloth/llama-3.2-3b-instruct-unsloth-bnb-4bit](https://huggingface.co/unsloth/llama-3.2-3b-instruct-unsloth-bnb-4bit). | |
| It has been trained using [TRL](https://github.com/huggingface/trl). | |
| ## Quick start | |
| - 注意沒辦法在mac silicon上執行 | |
| - 注意,請使用cuda GPU 執行,unsloth訓練的只支援GPU | |
| ```python | |
| from transformers import pipeline | |
| question = "請問光的3原色?" | |
| generator = pipeline("text-generation", model="roberthsu2003/llama3.2_3B_Instruct",device_map="auto", trust_remote_code=True) | |
| output = generator([{"role": "user", "content": question}], max_new_tokens=128, return_full_text=False)[0] | |
| print(output["generated_text"]) | |
| #======output========== | |
| 光的三原色是紅、藍和綠色。 | |
| output = generator([{"role": "user", "content": "請介紹一下台灣這個國家"}], max_new_tokens=128, return_full_text=False)[0] | |
| print(output["generated_text"]) | |
| #==========output========== | |
| 台灣是位於東亞的島國,擁有人口超過3.5億。它是一個繁榮的經濟體系,擁有世界上最好的科技、教育和醫療系統。台灣是世界上最多種語言的國家,主要語言包括繁體中文、台語、 Hoklo、 Hakka 和 Min Nan。它是世界上最多種宗教的國家,主要宗教包括佛教、天主教、基督教、伊斯蘭教和無神論 | |
| ``` | |
| ## Training procedure | |
| This model was trained with SFT. | |
| ### Framework versions | |
| - TRL: 0.15.2 | |
| - Transformers: 4.50.3 | |
| - Pytorch: 2.6.0+cu124 | |
| - Datasets: 3.5.0 | |
| - Tokenizers: 0.21.1 | |
| ## Citations | |
| Cite TRL as: | |
| ```bibtex | |
| @misc{vonwerra2022trl, | |
| title = {{TRL: Transformer Reinforcement Learning}}, | |
| author = {Leandro von Werra and Younes Belkada and Lewis Tunstall and Edward Beeching and Tristan Thrush and Nathan Lambert and Shengyi Huang and Kashif Rasul and Quentin Gallouédec}, | |
| year = 2020, | |
| journal = {GitHub repository}, | |
| publisher = {GitHub}, | |
| howpublished = {\url{https://github.com/huggingface/trl}} | |
| } | |
| ``` |