Instructions to use ducanhdinh/Macro-Nano-Instruct-Finetuning with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use ducanhdinh/Macro-Nano-Instruct-Finetuning with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("ATH-MaaS/Marco-Nano-Instruct") model = PeftModel.from_pretrained(base_model, "ducanhdinh/Macro-Nano-Instruct-Finetuning") - Notebooks
- Google Colab
- Kaggle
Macro-Nano-Instruct-Finetuning
Day la LoRA adapter finetune tu ATH-MaaS/Marco-Nano-Instruct, mot mo hinh Mixture-of-Experts.
Cau hinh LoRA
- Layer duoc finetune:
[9, 18)trong tong so28layer (tuong ung khoang 1L/3 -> 2L/3). - Module duoc gan LoRA: attention, router, experts trong khoang layer tren.
- r = 16, alpha = 32, dropout = 0.05
Loss
Loss MoE tieu chuan:
L_total = L_LM + lb_loss_coef * L_LB
L_LM: cross-entropy chuan tren token tiep theo.L_LB: load balancing loss chuan cua MoE (Switch/Mixtral style), tinh tren cac router nam trong khoang layer duoc finetune.lb_loss_coef= Nonenum_experts= 232,top_k= 8
Du lieu
Cau don ngu duoc gom tu 3 bo du lieu alignment: flores.json, bible.json, ntrex.json
(moi field ngon ngu trong 1 record duoc coi la 1 sample), shuffle va sort theo do dai token
truoc khi gom batch.
Diagnostics
Xem diagnostics/loss_log.jsonl (log theo tung step) va diagnostics/loss_curve.png
(bieu do L_LM / L_LB / L_Total theo step).
- Downloads last month
- 89
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support
Model tree for ducanhdinh/Macro-Nano-Instruct-Finetuning
Base model
ATH-MaaS/Marco-Nano-Instruct