Text Generation
PEFT
Safetensors
Chinese
English
chinese
reasoning
multiple-choice
lora
conversational
Instructions to use RayTsai/Kaggle_2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use RayTsai/Kaggle_2 with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-7B-Instruct") model = PeftModel.from_pretrained(base_model, "RayTsai/Kaggle_2") - Notebooks
- Google Colab
- Kaggle
|
Download README.md from RayTsai/Kaggle_2: direct link, hf CLI and curl.
- Browser
- Download file 1.05 kB
-
https://huggingface.co/RayTsai/Kaggle_2/resolve/main/README.md
- Command line
-
hf download hf://RayTsai/Kaggle_2/README.md
-
curl -L -o README.md https://huggingface.co/RayTsai/Kaggle_2/resolve/main/README.md
1.05 kB
| base_model: Qwen/Qwen2.5-7B-Instruct | |
| tags: | |
| - text-generation | |
| - chinese | |
| - reasoning | |
| - multiple-choice | |
| - lora | |
| - peft | |
| language: | |
| - zh | |
| - en | |
| library_name: peft | |
| license: apache-2.0 | |
| # Chinese LLM MCQ Model - KAGGLE #2 | |
| 這是NYCU深度學習課程KAGGLE #2的模型,使用Qwen2.5-7B-Instruct進行微調,加入了推理鏈能力。 | |
| ## 模型資訊 | |
| - **基礎模型**: Qwen/Qwen2.5-7B-Instruct | |
| - **微調方法**: LoRA (r=8, alpha=16) | |
| - **任務**: 中文單選題問答(含推理過程) | |
| - **訓練數據**: GPT-4生成的推理數據 | |
| ## 使用方法 | |
| ```python | |
| from transformers import AutoTokenizer, AutoModelForCausalLM | |
| from peft import PeftModel | |
| # 載入基礎模型 | |
| base_model = AutoModelForCausalLM.from_pretrained( | |
| "Qwen/Qwen2.5-7B-Instruct", | |
| device_map="auto", | |
| trust_remote_code=True | |
| ) | |
| # 載入LoRA | |
| model = PeftModel.from_pretrained(base_model, "RayTsai/Kaggle_2") | |
| # 載入tokenizer | |
| tokenizer = AutoTokenizer.from_pretrained("RayTsai/Kaggle_2") | |
| ``` | |
| ## 作者 | |
| - Ray Tsai (110651053) | |
| - NYCU 深度學習課程 2025 | |