@synsci/cli-darwin-x64 1.1.70 → 1.1.72
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/skills/citation-management/SKILL.md +1109 -0
- package/bin/skills/citation-management/assets/bibtex_template.bib +264 -0
- package/bin/skills/citation-management/assets/citation_checklist.md +386 -0
- package/bin/skills/citation-management/references/bibtex_formatting.md +908 -0
- package/bin/skills/citation-management/references/citation_validation.md +794 -0
- package/bin/skills/citation-management/references/google_scholar_search.md +725 -0
- package/bin/skills/citation-management/references/metadata_extraction.md +870 -0
- package/bin/skills/citation-management/references/pubmed_search.md +839 -0
- package/bin/skills/citation-management/scripts/doi_to_bibtex.py +182 -0
- package/bin/skills/citation-management/scripts/extract_metadata.py +570 -0
- package/bin/skills/citation-management/scripts/format_bibtex.py +349 -0
- package/bin/skills/citation-management/scripts/search_google_scholar.py +251 -0
- package/bin/skills/citation-management/scripts/search_pubmed.py +348 -0
- package/bin/skills/citation-management/scripts/validate_citations.py +494 -0
- package/bin/skills/clinical-decision-support/README.md +129 -0
- package/bin/skills/clinical-decision-support/SKILL.md +506 -0
- package/bin/skills/clinical-decision-support/assets/biomarker_report_template.tex +380 -0
- package/bin/skills/clinical-decision-support/assets/clinical_pathway_template.tex +222 -0
- package/bin/skills/clinical-decision-support/assets/cohort_analysis_template.tex +359 -0
- package/bin/skills/clinical-decision-support/assets/color_schemes.tex +149 -0
- package/bin/skills/clinical-decision-support/assets/example_gbm_cohort.md +208 -0
- package/bin/skills/clinical-decision-support/assets/recommendation_strength_guide.md +328 -0
- package/bin/skills/clinical-decision-support/assets/treatment_recommendation_template.tex +529 -0
- package/bin/skills/clinical-decision-support/references/biomarker_classification.md +719 -0
- package/bin/skills/clinical-decision-support/references/clinical_decision_algorithms.md +604 -0
- package/bin/skills/clinical-decision-support/references/evidence_synthesis.md +840 -0
- package/bin/skills/clinical-decision-support/references/outcome_analysis.md +640 -0
- package/bin/skills/clinical-decision-support/references/patient_cohort_analysis.md +427 -0
- package/bin/skills/clinical-decision-support/references/treatment_recommendations.md +521 -0
- package/bin/skills/clinical-decision-support/scripts/biomarker_classifier.py +383 -0
- package/bin/skills/clinical-decision-support/scripts/build_decision_tree.py +417 -0
- package/bin/skills/clinical-decision-support/scripts/create_cohort_tables.py +509 -0
- package/bin/skills/clinical-decision-support/scripts/generate_survival_analysis.py +441 -0
- package/bin/skills/clinical-decision-support/scripts/validate_cds_document.py +326 -0
- package/bin/skills/clinical-reports/IMPLEMENTATION_SUMMARY.md +641 -0
- package/bin/skills/clinical-reports/README.md +236 -0
- package/bin/skills/clinical-reports/SKILL.md +1127 -0
- package/bin/skills/clinical-reports/assets/case_report_template.md +352 -0
- package/bin/skills/clinical-reports/assets/clinical_trial_csr_template.md +353 -0
- package/bin/skills/clinical-reports/assets/clinical_trial_sae_template.md +359 -0
- package/bin/skills/clinical-reports/assets/consult_note_template.md +305 -0
- package/bin/skills/clinical-reports/assets/discharge_summary_template.md +453 -0
- package/bin/skills/clinical-reports/assets/hipaa_compliance_checklist.md +395 -0
- package/bin/skills/clinical-reports/assets/history_physical_template.md +305 -0
- package/bin/skills/clinical-reports/assets/lab_report_template.md +309 -0
- package/bin/skills/clinical-reports/assets/pathology_report_template.md +249 -0
- package/bin/skills/clinical-reports/assets/quality_checklist.md +338 -0
- package/bin/skills/clinical-reports/assets/radiology_report_template.md +318 -0
- package/bin/skills/clinical-reports/assets/soap_note_template.md +253 -0
- package/bin/skills/clinical-reports/references/case_report_guidelines.md +570 -0
- package/bin/skills/clinical-reports/references/clinical_trial_reporting.md +693 -0
- package/bin/skills/clinical-reports/references/data_presentation.md +530 -0
- package/bin/skills/clinical-reports/references/diagnostic_reports_standards.md +629 -0
- package/bin/skills/clinical-reports/references/medical_terminology.md +588 -0
- package/bin/skills/clinical-reports/references/patient_documentation.md +744 -0
- package/bin/skills/clinical-reports/references/peer_review_standards.md +585 -0
- package/bin/skills/clinical-reports/references/regulatory_compliance.md +577 -0
- package/bin/skills/clinical-reports/scripts/check_deidentification.py +332 -0
- package/bin/skills/clinical-reports/scripts/compliance_checker.py +78 -0
- package/bin/skills/clinical-reports/scripts/extract_clinical_data.py +97 -0
- package/bin/skills/clinical-reports/scripts/format_adverse_events.py +97 -0
- package/bin/skills/clinical-reports/scripts/generate_report_template.py +149 -0
- package/bin/skills/clinical-reports/scripts/terminology_validator.py +126 -0
- package/bin/skills/clinical-reports/scripts/validate_case_report.py +323 -0
- package/bin/skills/clinical-reports/scripts/validate_trial_report.py +88 -0
- package/bin/skills/fireworks-ai/SKILL.md +665 -0
- package/bin/skills/generate-image/SKILL.md +178 -0
- package/bin/skills/generate-image/scripts/generate_image.py +254 -0
- package/bin/skills/groq/SKILL.md +347 -0
- package/bin/skills/hypothesis-generation/SKILL.md +293 -0
- package/bin/skills/hypothesis-generation/assets/FORMATTING_GUIDE.md +672 -0
- package/bin/skills/hypothesis-generation/assets/hypothesis_generation.sty +307 -0
- package/bin/skills/hypothesis-generation/assets/hypothesis_report_template.tex +572 -0
- package/bin/skills/hypothesis-generation/references/experimental_design_patterns.md +329 -0
- package/bin/skills/hypothesis-generation/references/hypothesis_quality_criteria.md +198 -0
- package/bin/skills/hypothesis-generation/references/literature_search_strategies.md +622 -0
- package/bin/skills/latex-posters/README.md +417 -0
- package/bin/skills/latex-posters/SKILL.md +1602 -0
- package/bin/skills/latex-posters/assets/baposter_template.tex +257 -0
- package/bin/skills/latex-posters/assets/beamerposter_template.tex +244 -0
- package/bin/skills/latex-posters/assets/poster_quality_checklist.md +358 -0
- package/bin/skills/latex-posters/assets/tikzposter_template.tex +251 -0
- package/bin/skills/latex-posters/references/latex_poster_packages.md +745 -0
- package/bin/skills/latex-posters/references/poster_content_guide.md +748 -0
- package/bin/skills/latex-posters/references/poster_design_principles.md +806 -0
- package/bin/skills/latex-posters/references/poster_layout_design.md +900 -0
- package/bin/skills/latex-posters/scripts/review_poster.sh +214 -0
- package/bin/skills/literature-review/SKILL.md +641 -0
- package/bin/skills/literature-review/assets/review_template.md +412 -0
- package/bin/skills/literature-review/references/citation_styles.md +166 -0
- package/bin/skills/literature-review/references/database_strategies.md +455 -0
- package/bin/skills/literature-review/scripts/generate_pdf.py +184 -0
- package/bin/skills/literature-review/scripts/search_databases.py +310 -0
- package/bin/skills/literature-review/scripts/verify_citations.py +218 -0
- package/bin/skills/market-research-reports/SKILL.md +904 -0
- package/bin/skills/market-research-reports/assets/FORMATTING_GUIDE.md +428 -0
- package/bin/skills/market-research-reports/assets/market_report_template.tex +1380 -0
- package/bin/skills/market-research-reports/assets/market_research.sty +564 -0
- package/bin/skills/market-research-reports/references/data_analysis_patterns.md +548 -0
- package/bin/skills/market-research-reports/references/report_structure_guide.md +999 -0
- package/bin/skills/market-research-reports/references/visual_generation_guide.md +1077 -0
- package/bin/skills/market-research-reports/scripts/generate_market_visuals.py +472 -0
- package/bin/skills/markitdown/INSTALLATION_GUIDE.md +318 -0
- package/bin/skills/markitdown/LICENSE.txt +22 -0
- package/bin/skills/markitdown/OPENROUTER_INTEGRATION.md +359 -0
- package/bin/skills/markitdown/QUICK_REFERENCE.md +309 -0
- package/bin/skills/markitdown/README.md +184 -0
- package/bin/skills/markitdown/SKILL.md +486 -0
- package/bin/skills/markitdown/SKILL_SUMMARY.md +307 -0
- package/bin/skills/markitdown/assets/example_usage.md +463 -0
- package/bin/skills/markitdown/references/api_reference.md +399 -0
- package/bin/skills/markitdown/references/file_formats.md +542 -0
- package/bin/skills/markitdown/scripts/batch_convert.py +195 -0
- package/bin/skills/markitdown/scripts/convert_literature.py +262 -0
- package/bin/skills/markitdown/scripts/convert_with_ai.py +224 -0
- package/bin/skills/ml-paper-writing/SKILL.md +937 -0
- package/bin/skills/ml-paper-writing/references/checklists.md +361 -0
- package/bin/skills/ml-paper-writing/references/citation-workflow.md +562 -0
- package/bin/skills/ml-paper-writing/references/reviewer-guidelines.md +367 -0
- package/bin/skills/ml-paper-writing/references/sources.md +159 -0
- package/bin/skills/ml-paper-writing/references/writing-guide.md +476 -0
- package/bin/skills/ml-paper-writing/templates/README.md +251 -0
- package/bin/skills/ml-paper-writing/templates/aaai2026/README.md +534 -0
- package/bin/skills/ml-paper-writing/templates/aaai2026/aaai2026-unified-supp.tex +144 -0
- package/bin/skills/ml-paper-writing/templates/aaai2026/aaai2026-unified-template.tex +952 -0
- package/bin/skills/ml-paper-writing/templates/aaai2026/aaai2026.bib +111 -0
- package/bin/skills/ml-paper-writing/templates/aaai2026/aaai2026.bst +1493 -0
- package/bin/skills/ml-paper-writing/templates/aaai2026/aaai2026.sty +315 -0
- package/bin/skills/ml-paper-writing/templates/acl/README.md +50 -0
- package/bin/skills/ml-paper-writing/templates/acl/acl.sty +312 -0
- package/bin/skills/ml-paper-writing/templates/acl/acl_latex.tex +377 -0
- package/bin/skills/ml-paper-writing/templates/acl/acl_lualatex.tex +101 -0
- package/bin/skills/ml-paper-writing/templates/acl/acl_natbib.bst +1940 -0
- package/bin/skills/ml-paper-writing/templates/acl/anthology.bib.txt +26 -0
- package/bin/skills/ml-paper-writing/templates/acl/custom.bib +70 -0
- package/bin/skills/ml-paper-writing/templates/acl/formatting.md +326 -0
- package/bin/skills/ml-paper-writing/templates/colm2025/README.md +3 -0
- package/bin/skills/ml-paper-writing/templates/colm2025/colm2025_conference.bib +11 -0
- package/bin/skills/ml-paper-writing/templates/colm2025/colm2025_conference.bst +1440 -0
- package/bin/skills/ml-paper-writing/templates/colm2025/colm2025_conference.pdf +0 -0
- package/bin/skills/ml-paper-writing/templates/colm2025/colm2025_conference.sty +218 -0
- package/bin/skills/ml-paper-writing/templates/colm2025/colm2025_conference.tex +305 -0
- package/bin/skills/ml-paper-writing/templates/colm2025/fancyhdr.sty +485 -0
- package/bin/skills/ml-paper-writing/templates/colm2025/math_commands.tex +508 -0
- package/bin/skills/ml-paper-writing/templates/colm2025/natbib.sty +1246 -0
- package/bin/skills/ml-paper-writing/templates/iclr2026/fancyhdr.sty +485 -0
- package/bin/skills/ml-paper-writing/templates/iclr2026/iclr2026_conference.bib +24 -0
- package/bin/skills/ml-paper-writing/templates/iclr2026/iclr2026_conference.bst +1440 -0
- package/bin/skills/ml-paper-writing/templates/iclr2026/iclr2026_conference.pdf +0 -0
- package/bin/skills/ml-paper-writing/templates/iclr2026/iclr2026_conference.sty +246 -0
- package/bin/skills/ml-paper-writing/templates/iclr2026/iclr2026_conference.tex +414 -0
- package/bin/skills/ml-paper-writing/templates/iclr2026/math_commands.tex +508 -0
- package/bin/skills/ml-paper-writing/templates/iclr2026/natbib.sty +1246 -0
- package/bin/skills/ml-paper-writing/templates/icml2026/algorithm.sty +79 -0
- package/bin/skills/ml-paper-writing/templates/icml2026/algorithmic.sty +201 -0
- package/bin/skills/ml-paper-writing/templates/icml2026/example_paper.bib +75 -0
- package/bin/skills/ml-paper-writing/templates/icml2026/example_paper.pdf +0 -0
- package/bin/skills/ml-paper-writing/templates/icml2026/example_paper.tex +662 -0
- package/bin/skills/ml-paper-writing/templates/icml2026/fancyhdr.sty +864 -0
- package/bin/skills/ml-paper-writing/templates/icml2026/icml2026.bst +1443 -0
- package/bin/skills/ml-paper-writing/templates/icml2026/icml2026.sty +767 -0
- package/bin/skills/ml-paper-writing/templates/icml2026/icml_numpapers.pdf +0 -0
- package/bin/skills/ml-paper-writing/templates/neurips2025/Makefile +36 -0
- package/bin/skills/ml-paper-writing/templates/neurips2025/extra_pkgs.tex +53 -0
- package/bin/skills/ml-paper-writing/templates/neurips2025/main.tex +38 -0
- package/bin/skills/ml-paper-writing/templates/neurips2025/neurips.sty +382 -0
- package/bin/skills/paper-2-web/SKILL.md +491 -0
- package/bin/skills/paper-2-web/references/installation.md +141 -0
- package/bin/skills/paper-2-web/references/paper2poster.md +346 -0
- package/bin/skills/paper-2-web/references/paper2video.md +305 -0
- package/bin/skills/paper-2-web/references/paper2web.md +187 -0
- package/bin/skills/paper-2-web/references/usage_examples.md +436 -0
- package/bin/skills/peer-review/SKILL.md +702 -0
- package/bin/skills/peer-review/references/calibration_guidelines.md +196 -0
- package/bin/skills/peer-review/references/common_issues.md +552 -0
- package/bin/skills/peer-review/references/paper_mechanics.md +269 -0
- package/bin/skills/peer-review/references/reporting_standards.md +290 -0
- package/bin/skills/peer-review/references/scoring_rubric.md +239 -0
- package/bin/skills/pptx-posters/SKILL.md +410 -0
- package/bin/skills/pptx-posters/assets/poster_html_template.html +257 -0
- package/bin/skills/pptx-posters/assets/poster_quality_checklist.md +358 -0
- package/bin/skills/pptx-posters/references/poster_content_guide.md +748 -0
- package/bin/skills/pptx-posters/references/poster_design_principles.md +806 -0
- package/bin/skills/pptx-posters/references/poster_layout_design.md +900 -0
- package/bin/skills/research-grants/README.md +285 -0
- package/bin/skills/research-grants/SKILL.md +938 -0
- package/bin/skills/research-grants/assets/budget_justification_template.md +453 -0
- package/bin/skills/research-grants/assets/nih_specific_aims_template.md +166 -0
- package/bin/skills/research-grants/assets/nsf_project_summary_template.md +92 -0
- package/bin/skills/research-grants/references/broader_impacts.md +392 -0
- package/bin/skills/research-grants/references/darpa_guidelines.md +636 -0
- package/bin/skills/research-grants/references/doe_guidelines.md +586 -0
- package/bin/skills/research-grants/references/nih_guidelines.md +851 -0
- package/bin/skills/research-grants/references/nsf_guidelines.md +570 -0
- package/bin/skills/research-grants/references/specific_aims_guide.md +458 -0
- package/bin/skills/research-lookup/README.md +156 -0
- package/bin/skills/research-lookup/SKILL.md +606 -0
- package/bin/skills/research-lookup/examples.py +174 -0
- package/bin/skills/research-lookup/lookup.py +187 -0
- package/bin/skills/research-lookup/research_lookup.py +483 -0
- package/bin/skills/research-lookup/scripts/research_lookup.py +483 -0
- package/bin/skills/scholar-evaluation/SKILL.md +289 -0
- package/bin/skills/scholar-evaluation/references/evaluation_framework.md +663 -0
- package/bin/skills/scholar-evaluation/scripts/calculate_scores.py +366 -0
- package/bin/skills/scientific-critical-thinking/SKILL.md +566 -0
- package/bin/skills/scientific-critical-thinking/references/common_biases.md +364 -0
- package/bin/skills/scientific-critical-thinking/references/evidence_hierarchy.md +484 -0
- package/bin/skills/scientific-critical-thinking/references/experimental_design.md +496 -0
- package/bin/skills/scientific-critical-thinking/references/logical_fallacies.md +478 -0
- package/bin/skills/scientific-critical-thinking/references/scientific_method.md +169 -0
- package/bin/skills/scientific-critical-thinking/references/statistical_pitfalls.md +506 -0
- package/bin/skills/scientific-schematics/QUICK_REFERENCE.md +207 -0
- package/bin/skills/scientific-schematics/README.md +327 -0
- package/bin/skills/scientific-schematics/SKILL.md +615 -0
- package/bin/skills/scientific-schematics/example_usage.sh +89 -0
- package/bin/skills/scientific-schematics/references/best_practices.md +559 -0
- package/bin/skills/scientific-schematics/scripts/generate_schematic.py +135 -0
- package/bin/skills/scientific-schematics/scripts/generate_schematic_ai.py +807 -0
- package/bin/skills/scientific-schematics/test_ai_generation.py +243 -0
- package/bin/skills/scientific-slides/SKILL.md +942 -0
- package/bin/skills/scientific-slides/assets/timing_guidelines.md +597 -0
- package/bin/skills/scientific-slides/references/data_visualization_slides.md +708 -0
- package/bin/skills/scientific-slides/references/presentation_structure.md +642 -0
- package/bin/skills/scientific-slides/references/slide_design_principles.md +849 -0
- package/bin/skills/scientific-slides/references/talk_types_guide.md +687 -0
- package/bin/skills/scientific-slides/references/visual_review_workflow.md +775 -0
- package/bin/skills/scientific-slides/scripts/generate_slide_image.py +143 -0
- package/bin/skills/scientific-slides/scripts/generate_slide_image_ai.py +748 -0
- package/bin/skills/scientific-slides/scripts/pdf_to_images.py +201 -0
- package/bin/skills/scientific-slides/scripts/slides_to_pdf.py +220 -0
- package/bin/skills/scientific-slides/scripts/validate_presentation.py +367 -0
- package/bin/skills/scientific-writing/SKILL.md +714 -0
- package/bin/skills/scientific-writing/assets/REPORT_FORMATTING_GUIDE.md +574 -0
- package/bin/skills/scientific-writing/assets/scientific_report.sty +606 -0
- package/bin/skills/scientific-writing/assets/scientific_report_template.tex +449 -0
- package/bin/skills/scientific-writing/references/citation_styles.md +720 -0
- package/bin/skills/scientific-writing/references/figures_tables.md +806 -0
- package/bin/skills/scientific-writing/references/imrad_structure.md +686 -0
- package/bin/skills/scientific-writing/references/professional_report_formatting.md +664 -0
- package/bin/skills/scientific-writing/references/reporting_guidelines.md +748 -0
- package/bin/skills/scientific-writing/references/writing_principles.md +824 -0
- package/bin/skills/tinker/SKILL.md +2 -3
- package/bin/skills/together-ai/SKILL.md +722 -0
- package/bin/skills/treatment-plans/README.md +488 -0
- package/bin/skills/treatment-plans/SKILL.md +1579 -0
- package/bin/skills/treatment-plans/assets/STYLING_QUICK_REFERENCE.md +185 -0
- package/bin/skills/treatment-plans/assets/chronic_disease_management_plan.tex +665 -0
- package/bin/skills/treatment-plans/assets/general_medical_treatment_plan.tex +547 -0
- package/bin/skills/treatment-plans/assets/medical_treatment_plan.sty +222 -0
- package/bin/skills/treatment-plans/assets/mental_health_treatment_plan.tex +774 -0
- package/bin/skills/treatment-plans/assets/one_page_treatment_plan.tex +193 -0
- package/bin/skills/treatment-plans/assets/pain_management_plan.tex +799 -0
- package/bin/skills/treatment-plans/assets/perioperative_care_plan.tex +753 -0
- package/bin/skills/treatment-plans/assets/quality_checklist.md +471 -0
- package/bin/skills/treatment-plans/assets/rehabilitation_treatment_plan.tex +756 -0
- package/bin/skills/treatment-plans/references/goal_setting_frameworks.md +411 -0
- package/bin/skills/treatment-plans/references/intervention_guidelines.md +507 -0
- package/bin/skills/treatment-plans/references/regulatory_compliance.md +476 -0
- package/bin/skills/treatment-plans/references/specialty_specific_guidelines.md +655 -0
- package/bin/skills/treatment-plans/references/treatment_plan_standards.md +485 -0
- package/bin/skills/treatment-plans/scripts/check_completeness.py +322 -0
- package/bin/skills/treatment-plans/scripts/generate_template.py +233 -0
- package/bin/skills/treatment-plans/scripts/timeline_generator.py +385 -0
- package/bin/skills/treatment-plans/scripts/validate_treatment_plan.py +369 -0
- package/bin/skills/unsloth/SKILL.md +565 -47
- package/bin/skills/unsloth/docs/advanced-rl.md +222 -0
- package/bin/skills/unsloth/docs/chat-templates.md +141 -0
- package/bin/skills/unsloth/docs/datasets.md +489 -0
- package/bin/skills/unsloth/docs/docker-extended.md +99 -0
- package/bin/skills/unsloth/docs/dynamic-ggufs-2.0.md +116 -0
- package/bin/skills/unsloth/docs/dynamic-ggufs-aider.md +118 -0
- package/bin/skills/unsloth/docs/faq.md +91 -0
- package/bin/skills/unsloth/docs/fp16-vs-bf16.md +61 -0
- package/bin/skills/unsloth/docs/fp8-rl.md +224 -0
- package/bin/skills/unsloth/docs/glm-4.7-flash.md +997 -0
- package/bin/skills/unsloth/docs/inference-deployment-overview.md +17 -0
- package/bin/skills/unsloth/docs/inference.md +27 -0
- package/bin/skills/unsloth/docs/installation-docker.md +155 -0
- package/bin/skills/unsloth/docs/installation-pip.md +148 -0
- package/bin/skills/unsloth/docs/kernels-packing.md +190 -0
- package/bin/skills/unsloth/docs/kimi-k2.5.md +634 -0
- package/bin/skills/unsloth/docs/lm-studio.md +235 -0
- package/bin/skills/unsloth/docs/lora-hot-swapping.md +75 -0
- package/bin/skills/unsloth/docs/lora-hyperparameters.md +363 -0
- package/bin/skills/unsloth/docs/memory-efficient-rl.md +267 -0
- package/bin/skills/unsloth/docs/model-selection.md +70 -0
- package/bin/skills/unsloth/docs/models.md +532 -0
- package/bin/skills/unsloth/docs/multi-gpu-ddp.md +90 -0
- package/bin/skills/unsloth/docs/notebooks.md +223 -0
- package/bin/skills/unsloth/docs/overview.md +110 -0
- package/bin/skills/unsloth/docs/qwen3-coder-next-extended.md +900 -0
- package/bin/skills/unsloth/docs/qwen3-coder-next.md +900 -0
- package/bin/skills/unsloth/docs/requirements.md +45 -0
- package/bin/skills/unsloth/docs/reward-hacking.md +25 -0
- package/bin/skills/unsloth/docs/saving-to-gguf.md +138 -0
- package/bin/skills/unsloth/docs/saving-to-ollama.md +46 -0
- package/bin/skills/unsloth/docs/sglang-guide.md +278 -0
- package/bin/skills/unsloth/docs/speculative-decoding.md +70 -0
- package/bin/skills/unsloth/docs/tool-calling.md +334 -0
- package/bin/skills/unsloth/docs/troubleshooting-faq.md +204 -0
- package/bin/skills/unsloth/docs/troubleshooting-inference.md +26 -0
- package/bin/skills/unsloth/docs/tts-fine-tuning.md +149 -0
- package/bin/skills/unsloth/docs/tutorial-grpo.md +273 -0
- package/bin/skills/unsloth/docs/tutorial-llama3-ollama.md +356 -0
- package/bin/skills/unsloth/docs/vision-fine-tuning.md +135 -0
- package/bin/skills/unsloth/docs/vision-rl.md +170 -0
- package/bin/skills/unsloth/docs/vllm-engine-arguments.md +43 -0
- package/bin/skills/unsloth/docs/vllm-guide.md +98 -0
- package/bin/skills/venue-templates/SKILL.md +686 -0
- package/bin/skills/venue-templates/assets/examples/cell_summary_example.md +247 -0
- package/bin/skills/venue-templates/assets/examples/medical_structured_abstract.md +313 -0
- package/bin/skills/venue-templates/assets/examples/nature_abstract_examples.md +213 -0
- package/bin/skills/venue-templates/assets/examples/neurips_introduction_example.md +245 -0
- package/bin/skills/venue-templates/assets/grants/nih_specific_aims.tex +235 -0
- package/bin/skills/venue-templates/assets/grants/nsf_proposal_template.tex +375 -0
- package/bin/skills/venue-templates/assets/journals/nature_article.tex +171 -0
- package/bin/skills/venue-templates/assets/journals/neurips_article.tex +283 -0
- package/bin/skills/venue-templates/assets/journals/plos_one.tex +317 -0
- package/bin/skills/venue-templates/assets/posters/beamerposter_academic.tex +311 -0
- package/bin/skills/venue-templates/references/cell_press_style.md +483 -0
- package/bin/skills/venue-templates/references/conferences_formatting.md +564 -0
- package/bin/skills/venue-templates/references/cs_conference_style.md +463 -0
- package/bin/skills/venue-templates/references/grants_requirements.md +787 -0
- package/bin/skills/venue-templates/references/journals_formatting.md +486 -0
- package/bin/skills/venue-templates/references/medical_journal_styles.md +535 -0
- package/bin/skills/venue-templates/references/ml_conference_style.md +556 -0
- package/bin/skills/venue-templates/references/nature_science_style.md +405 -0
- package/bin/skills/venue-templates/references/posters_guidelines.md +628 -0
- package/bin/skills/venue-templates/references/reviewer_expectations.md +417 -0
- package/bin/skills/venue-templates/references/venue_writing_styles.md +321 -0
- package/bin/skills/venue-templates/scripts/customize_template.py +195 -0
- package/bin/skills/venue-templates/scripts/query_template.py +266 -0
- package/bin/skills/venue-templates/scripts/validate_format.py +250 -0
- package/bin/synsc +0 -0
- package/package.json +1 -1
- package/bin/skills/unsloth/references/index.md +0 -7
- package/bin/skills/unsloth/references/llms-full.md +0 -16799
- package/bin/skills/unsloth/references/llms-txt.md +0 -12044
- package/bin/skills/unsloth/references/llms.md +0 -82
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
# Text-to-Speech (TTS) Fine-tuning Guide
|
|
2
|
+
|
|
3
|
+
Fine-tuning TTS models allows them to adapt to your specific dataset, use case, or desired style and tone. The goal is to customize these models to clone voices, adapt speaking styles and tones, support new languages, handle specific tasks and more. We also support **Speech-to-Text (STT)** models like OpenAI's Whisper.
|
|
4
|
+
|
|
5
|
+
With Unsloth, you can fine-tune **any** TTS model (`transformers` compatible) 1.5x faster with 50% less memory than other implementations with Flash Attention 2.
|
|
6
|
+
|
|
7
|
+
Unsloth supports any `transformers` compatible TTS model. Even if we don't have a notebook or upload for it yet, it's still supported e.g., try fine-tuning Dia-TTS or Moshi.
|
|
8
|
+
|
|
9
|
+
> Zero-shot cloning captures tone but misses pacing and expression, often sounding robotic and unnatural. Fine-tuning delivers far more accurate and realistic voice replication.
|
|
10
|
+
|
|
11
|
+
## Fine-tuning Notebooks
|
|
12
|
+
|
|
13
|
+
We've also uploaded TTS models (original and quantized) to our [Hugging Face page](https://huggingface.co/collections/unsloth/text-to-speech-tts-models-68007ab12522e96be1e02155).
|
|
14
|
+
|
|
15
|
+
| Model | Notebook |
|
|
16
|
+
|-------|----------|
|
|
17
|
+
| Sesame-CSM (1B) | [Open in Colab](https://colab.research.google.com/github/unslothai/notebooks/blob/main/nb/Sesame_CSM_(1B)-TTS.ipynb) |
|
|
18
|
+
| Orpheus-TTS (3B) | [Open in Colab](https://colab.research.google.com/github/unslothai/notebooks/blob/main/nb/Orpheus_(3B)-TTS.ipynb) |
|
|
19
|
+
| Whisper Large V3 (STT) | [Open in Colab](https://colab.research.google.com/github/unslothai/notebooks/blob/main/nb/Whisper.ipynb) |
|
|
20
|
+
| Spark-TTS (0.5B) | [Open in Colab](https://colab.research.google.com/github/unslothai/notebooks/blob/main/nb/Spark_TTS_(0_5B).ipynb) |
|
|
21
|
+
| Llasa-TTS (1B) | [Open in Colab](https://colab.research.google.com/github/unslothai/notebooks/blob/main/nb/Llasa_TTS_(1B).ipynb) |
|
|
22
|
+
| Oute-TTS (1B) | [Open in Colab](https://colab.research.google.com/github/unslothai/notebooks/blob/main/nb/Oute_TTS_(1B).ipynb) |
|
|
23
|
+
|
|
24
|
+
> If you notice that the output duration reaches a maximum of 10 seconds, increase `max_new_tokens = 125` from its default value of 125. Since 125 tokens corresponds to 10 seconds of audio, you'll need to set a higher value for longer outputs.
|
|
25
|
+
|
|
26
|
+
## Choosing and Loading a TTS Model
|
|
27
|
+
|
|
28
|
+
For TTS, smaller models are often preferred due to lower latency and faster inference. Fine-tuning a model under 3B parameters is often ideal.
|
|
29
|
+
|
|
30
|
+
### Sesame-CSM (1B) Details
|
|
31
|
+
|
|
32
|
+
CSM-1B is a base model, while Orpheus-ft is fine-tuned on 8 professional voice actors, making voice consistency the key difference. CSM requires audio context for each speaker to perform well, whereas Orpheus-ft has this consistency built in.
|
|
33
|
+
|
|
34
|
+
### Orpheus-TTS (3B) Details
|
|
35
|
+
|
|
36
|
+
Orpheus is pre-trained on a large speech corpus and excels at generating realistic speech with built-in support for emotional cues like laughs and sighs. Its architecture makes it one of the easiest TTS models to utilize and train as it can be exported via llama.cpp meaning it has great compatibility across all inference engines.
|
|
37
|
+
|
|
38
|
+
### Loading the models
|
|
39
|
+
|
|
40
|
+
Because voice models are usually small in size, you can train the models using LoRA 16-bit or full fine-tuning FFT:
|
|
41
|
+
|
|
42
|
+
```python
|
|
43
|
+
from unsloth import FastModel
|
|
44
|
+
|
|
45
|
+
model_name = "unsloth/orpheus-3b-0.1-pretrained"
|
|
46
|
+
model, tokenizer = FastModel.from_pretrained(
|
|
47
|
+
model_name,
|
|
48
|
+
load_in_4bit=False # use 4-bit precision (QLoRA)
|
|
49
|
+
)
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Preparing Your Dataset
|
|
53
|
+
|
|
54
|
+
At minimum, a TTS fine-tuning dataset consists of **audio clips and their corresponding transcripts** (text).
|
|
55
|
+
|
|
56
|
+
**Option 1: Using Hugging Face Datasets library:**
|
|
57
|
+
|
|
58
|
+
```python
|
|
59
|
+
from datasets import load_dataset, Audio
|
|
60
|
+
|
|
61
|
+
dataset = load_dataset("MrDragonFox/Elise", split="train")
|
|
62
|
+
print(len(dataset), "samples") # ~1200 samples in Elise
|
|
63
|
+
|
|
64
|
+
# Ensure all audio is at 24 kHz sampling rate (Orpheus's expected rate)
|
|
65
|
+
dataset = dataset.cast_column("audio", Audio(sampling_rate=24000))
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Orpheus supports tags like `<laugh>`, `<chuckle>`, `<sigh>`, `<cough>`, `<sniffle>`, `<groan>`, `<yawn>`, `<gasp>`, etc. For example: `"I missed you <laugh> so much!"`.
|
|
69
|
+
|
|
70
|
+
**Option 2: Preparing a custom dataset:**
|
|
71
|
+
|
|
72
|
+
* Organize audio clips (WAV/FLAC files) in a folder.
|
|
73
|
+
* Create a CSV or TSV file with columns for file path and transcript:
|
|
74
|
+
|
|
75
|
+
```
|
|
76
|
+
filename,text
|
|
77
|
+
0001.wav,Hello there!
|
|
78
|
+
0002.wav,<sigh> I am very tired.
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
```python
|
|
82
|
+
from datasets import Audio
|
|
83
|
+
dataset = load_dataset("csv", data_files="mydata.csv", split="train")
|
|
84
|
+
dataset = dataset.cast_column("filename", Audio(sampling_rate=24000))
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## Fine-Tuning TTS with Unsloth
|
|
88
|
+
|
|
89
|
+
### Step 1: Load the Model and Dataset
|
|
90
|
+
|
|
91
|
+
```python
|
|
92
|
+
from unsloth import FastLanguageModel
|
|
93
|
+
import torch
|
|
94
|
+
|
|
95
|
+
model, tokenizer = FastLanguageModel.from_pretrained(
|
|
96
|
+
model_name = "unsloth/orpheus-3b-0.1-ft",
|
|
97
|
+
max_seq_length = 2048,
|
|
98
|
+
dtype = None,
|
|
99
|
+
load_in_4bit = False,
|
|
100
|
+
)
|
|
101
|
+
|
|
102
|
+
from datasets import load_dataset
|
|
103
|
+
dataset = load_dataset("MrDragonFox/Elise", split = "train")
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### Step 2: Set up training arguments and Trainer
|
|
107
|
+
|
|
108
|
+
```python
|
|
109
|
+
from transformers import TrainingArguments, Trainer, DataCollatorForSeq2Seq
|
|
110
|
+
from unsloth import is_bfloat16_supported
|
|
111
|
+
|
|
112
|
+
trainer = Trainer(
|
|
113
|
+
model = model,
|
|
114
|
+
train_dataset = dataset,
|
|
115
|
+
args = TrainingArguments(
|
|
116
|
+
per_device_train_batch_size = 1,
|
|
117
|
+
gradient_accumulation_steps = 4,
|
|
118
|
+
warmup_steps = 5,
|
|
119
|
+
max_steps = 60,
|
|
120
|
+
learning_rate = 2e-4,
|
|
121
|
+
fp16 = not is_bfloat16_supported(),
|
|
122
|
+
bf16 = is_bfloat16_supported(),
|
|
123
|
+
logging_steps = 1,
|
|
124
|
+
optim = "adamw_8bit",
|
|
125
|
+
weight_decay = 0.01,
|
|
126
|
+
lr_scheduler_type = "linear",
|
|
127
|
+
seed = 3407,
|
|
128
|
+
output_dir = "outputs",
|
|
129
|
+
report_to = "none",
|
|
130
|
+
),
|
|
131
|
+
)
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### Step 3: Train and Save
|
|
135
|
+
|
|
136
|
+
```python
|
|
137
|
+
trainer.train()
|
|
138
|
+
|
|
139
|
+
model.save_pretrained("lora_model")
|
|
140
|
+
tokenizer.save_pretrained("lora_model")
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
## Fine-tuning Voice models vs. Zero-shot voice cloning
|
|
144
|
+
|
|
145
|
+
Zero-shot voice cloning captures the general **tone and timbre** of a speaker's voice, but it doesn't reproduce the full expressive range. You lose details like speaking speed, phrasing, vocal quirks, and the subtleties of prosody.
|
|
146
|
+
|
|
147
|
+
If you just want a different voice and are fine with the same delivery patterns, zero-shot is usually good enough. But the speech will still follow the **model's style**, not the speaker's.
|
|
148
|
+
|
|
149
|
+
For anything more personalized or expressive, you need training with methods like LoRA to truly capture how someone speaks.
|
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
# Tutorial: Train your own Reasoning model with GRPO
|
|
2
|
+
|
|
3
|
+
DeepSeek developed [GRPO](https://unsloth.ai/blog/grpo) (Group Relative Policy Optimization) to train their R1 reasoning models.
|
|
4
|
+
|
|
5
|
+
### Quickstart
|
|
6
|
+
|
|
7
|
+
These instructions are for our pre-made Google Colab [notebooks](https://unsloth.ai/docs/get-started/unsloth-notebooks). If you are installing Unsloth locally, you can also copy our notebooks inside your favorite code editor. We'll be using any of these notebooks:
|
|
8
|
+
|
|
9
|
+
| [**gpt-oss-20b**](https://colab.research.google.com/github/unslothai/notebooks/blob/main/nb/gpt-oss-\(20B\)-GRPO.ipynb) **-** GSPO | [**Qwen2.5-VL**](https://colab.research.google.com/github/unslothai/notebooks/blob/main/nb/Qwen2_5_7B_VL_GRPO.ipynb) - Vision GSPO | [Gemma 3 (4B)](https://colab.research.google.com/github/unslothai/notebooks/blob/main/nb/Gemma3_\(4B\)-Vision-GRPO.ipynb) - Vision GSPO |
|
|
10
|
+
| ---------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
11
|
+
| [**Qwen3 (4B)**](https://colab.research.google.com/github/unslothai/notebooks/blob/main/nb/Qwen3_\(4B\)-GRPO.ipynb) - Advanced | [**DeepSeek-R1-0528-Qwen3-8B**](https://colab.research.google.com/github/unslothai/notebooks/blob/main/nb/DeepSeek_R1_0528_Qwen3_\(8B\)_GRPO.ipynb) | [Llama 3.2 (3B)](https://colab.research.google.com/github/unslothai/notebooks/blob/main/nb/Advanced_Llama3_2_\(3B\)_GRPO_LoRA.ipynb) - Advanced |
|
|
12
|
+
|
|
13
|
+
{% stepper %}
|
|
14
|
+
{% step %}
|
|
15
|
+
|
|
16
|
+
#### Install Unsloth
|
|
17
|
+
|
|
18
|
+
If you're using our Colab notebook, click **Runtime > Run all**. We'd highly recommend you checking out our [Fine-tuning Guide](https://unsloth.ai/docs/get-started/fine-tuning-llms-guide) before getting started.
|
|
19
|
+
|
|
20
|
+
If installing locally, ensure you have the correct [requirements](https://unsloth.ai/docs/get-started/fine-tuning-for-beginners/unsloth-requirements) and use `pip install unsloth` on Linux or follow our [Windows install ](https://unsloth.ai/docs/get-started/install/windows-installation)instructions.
|
|
21
|
+
|
|
22
|
+
<figure><img src="https://3215535692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2Fgit-blob-313fa39c229225ae9d39b7c7a0d05c9005ddb94c%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>
|
|
23
|
+
{% endstep %}
|
|
24
|
+
|
|
25
|
+
{% step %}
|
|
26
|
+
|
|
27
|
+
#### Learn about GRPO & Reward Functions
|
|
28
|
+
|
|
29
|
+
Before we get started, it is recommended to learn more about GRPO, reward functions and how they work. Read more about them including [tips & tricks](https://unsloth.ai/docs/get-started/reinforcement-learning-rl-guide/..#basics-tips)[ here](https://unsloth.ai/docs/get-started/reinforcement-learning-rl-guide/..#basics-tips).
|
|
30
|
+
|
|
31
|
+
You will also need enough VRAM. In general, model parameters = amount of VRAM you will need. In Colab, we are using their free 16GB VRAM GPUs which can train any model up to 16B in parameters.
|
|
32
|
+
{% endstep %}
|
|
33
|
+
|
|
34
|
+
{% step %}
|
|
35
|
+
|
|
36
|
+
#### Configure desired settings
|
|
37
|
+
|
|
38
|
+
We have pre-selected optimal settings for the best results for you already and you can change the model to whichever you want listed in our [supported models](https://unsloth.ai/docs/get-started/unsloth-model-catalog). Would not recommend changing other settings if you're a beginner.
|
|
39
|
+
|
|
40
|
+
{% hint style="success" %}
|
|
41
|
+
For **advanced GRPO** documentation on batching, generation and training parameters, [read our guide!](https://unsloth.ai/docs/get-started/reinforcement-learning-rl-guide/advanced-rl-documentation)
|
|
42
|
+
{% endhint %}
|
|
43
|
+
|
|
44
|
+
<figure><img src="https://3215535692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2Fgit-blob-b1e9fac448706ac87dff7e7eff1298655dda456e%2Fimage.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>
|
|
45
|
+
{% endstep %}
|
|
46
|
+
|
|
47
|
+
{% step %}
|
|
48
|
+
|
|
49
|
+
#### Data preparation
|
|
50
|
+
|
|
51
|
+
We have pre-selected OpenAI's [GSM8K](https://huggingface.co/datasets/openai/gsm8k) dataset which contains grade school math problems but you could change it to your own or any public one on Hugging Face. You can read more about [datasets here](https://unsloth.ai/docs/get-started/fine-tuning-llms-guide/datasets-guide).
|
|
52
|
+
|
|
53
|
+
Your dataset should still have at least 2 columns for question and answer pairs. However the answer must not reveal the reasoning behind how it derived the answer from the question. See below for an example:
|
|
54
|
+
|
|
55
|
+
<figure><img src="https://3215535692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2Fgit-blob-14a1ee796547f725abbd1097f2b0f9e4e6cc5976%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>
|
|
56
|
+
|
|
57
|
+
We'll structure the data to prompt the model to articulate its reasoning before delivering an answer. To start, we'll establish a clear format for both prompts and responses.
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
# Define the system prompt that instructs the model to use a specific format
|
|
61
|
+
SYSTEM_PROMPT = """
|
|
62
|
+
Respond in the following format:
|
|
63
|
+
<reasoning>
|
|
64
|
+
...
|
|
65
|
+
</reasoning>
|
|
66
|
+
<answer>
|
|
67
|
+
...
|
|
68
|
+
</answer>
|
|
69
|
+
"""
|
|
70
|
+
|
|
71
|
+
XML_COT_FORMAT = """\
|
|
72
|
+
<reasoning>
|
|
73
|
+
{reasoning}
|
|
74
|
+
</reasoning>
|
|
75
|
+
<answer>
|
|
76
|
+
{answer}
|
|
77
|
+
</answer>
|
|
78
|
+
"""
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Now, to prepare the dataset:
|
|
82
|
+
|
|
83
|
+
```
|
|
84
|
+
import re
|
|
85
|
+
from datasets import load_dataset, Dataset
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
# Helper functions to extract answers from different formats
|
|
89
|
+
def extract_xml_answer(text: str) -> str:
|
|
90
|
+
answer = text.split("<answer>")[-1]
|
|
91
|
+
answer = answer.split("</answer>")[0]
|
|
92
|
+
return answer.strip()
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
def extract_hash_answer(text: str) -> str | None:
|
|
96
|
+
if "####" not in text:
|
|
97
|
+
return None
|
|
98
|
+
return text.split("####")[1].strip()
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
# Function to prepare the GSM8K dataset
|
|
102
|
+
def get_gsm8k_questions(split="train") -> Dataset:
|
|
103
|
+
data = load_dataset("openai/gsm8k", "main")[split]
|
|
104
|
+
data = data.map(
|
|
105
|
+
lambda x: {
|
|
106
|
+
"prompt": [
|
|
107
|
+
{"role": "system", "content": SYSTEM_PROMPT},
|
|
108
|
+
{"role": "user", "content": x["question"]},
|
|
109
|
+
],
|
|
110
|
+
"answer": extract_hash_answer(x["answer"]),
|
|
111
|
+
}
|
|
112
|
+
)
|
|
113
|
+
return data
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
dataset = get_gsm8k_questions()
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
The dataset is prepared by extracting the answers and formatting them as structured strings.
|
|
120
|
+
{% endstep %}
|
|
121
|
+
|
|
122
|
+
{% step %}
|
|
123
|
+
|
|
124
|
+
#### Reward Functions/Verifier
|
|
125
|
+
|
|
126
|
+
[Reward Functions/Verifiers](https://unsloth.ai/docs/get-started/reinforcement-learning-rl-guide/..#reward-functions-verifier) lets us know if the model is doing well or not according to the dataset you have provided. Each generation run will be assessed on how it performs to the score of the average of the rest of generations. You can create your own reward functions however we have already pre-selected them for you with [Will's GSM8K](https://unsloth.ai/docs/get-started/reinforcement-learning-rl-guide/..#gsm8k-reward-functions) reward functions. With this, we have 5 different ways which we can reward each generation.
|
|
127
|
+
|
|
128
|
+
You can input your generations into an LLM like ChatGPT 4o or Llama 3.1 (8B) and design a reward function and verifier to evaluate it. For example, feed your generations into a LLM of your choice and set a rule: "If the answer sounds too robotic, deduct 3 points." This helps refine outputs based on quality criteria. **See examples** of what they can look like [here](https://unsloth.ai/docs/get-started/reinforcement-learning-rl-guide/..#reward-function-examples).
|
|
129
|
+
|
|
130
|
+
**Example Reward Function for an Email Automation Task:**
|
|
131
|
+
|
|
132
|
+
* **Question:** Inbound email
|
|
133
|
+
* **Answer:** Outbound email
|
|
134
|
+
* **Reward Functions:**
|
|
135
|
+
* If the answer contains a required keyword → **+1**
|
|
136
|
+
* If the answer exactly matches the ideal response → **+1**
|
|
137
|
+
* If the response is too long → **-1**
|
|
138
|
+
* If the recipient's name is included → **+1**
|
|
139
|
+
* If a signature block (phone, email, address) is present → **+1**
|
|
140
|
+
|
|
141
|
+
<figure><img src="https://3215535692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2Fgit-blob-95cd00b6a52b8161b31a2399e25863ee0349920e%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>
|
|
142
|
+
{% endstetep %}
|
|
143
|
+
|
|
144
|
+
#### Train your model
|
|
145
|
+
|
|
146
|
+
We have pre-selected hyperparameters for the most optimal results however you could change them. Read all about [parameters here](https://unsloth.ai/docs/get-started/fine-tuning-llms-guide/lora-hyperparameters-guide). For **advanced GRPO** documentation on batching, generation and training parameters, [read our guide!](https://unsloth.ai/docs/get-started/reinforcement-learning-rl-guide/advanced-rl-documentation)
|
|
147
|
+
|
|
148
|
+
<figure><img src="https://3215535692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2Fgit-blob-a22d3475d925d2d858c9fcc228f0e13893eff0f9%2Fimage.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>
|
|
149
|
+
|
|
150
|
+
The **GRPOConfig** defines key hyperparameters for training:
|
|
151
|
+
|
|
152
|
+
* `use_vllm`: Activates fast inference using vLLM.
|
|
153
|
+
* `learning_rate`: Determines the model's learning speed.
|
|
154
|
+
* `num_generations`: Specifies the number of completions generated per prompt.
|
|
155
|
+
* `max_steps`: Sets the total number of training steps.
|
|
156
|
+
|
|
157
|
+
{% hint style="success" %}
|
|
158
|
+
**NEW!** We now support DAPO, Dr. GRPO and most other new GRPO techniques. You can play with the following arguments in GRPOConfig to enable:
|
|
159
|
+
|
|
160
|
+
```python
|
|
161
|
+
epsilon=0.2,
|
|
162
|
+
epsilon_high=0.28, # one sided
|
|
163
|
+
delta=1.5 # two sided
|
|
164
|
+
|
|
165
|
+
loss_type='bnpo',
|
|
166
|
+
# or:
|
|
167
|
+
loss_type='grpo',
|
|
168
|
+
# or:
|
|
169
|
+
loss_type='dr_grpo',
|
|
170
|
+
# or:
|
|
171
|
+
loss_type='dapo',
|
|
172
|
+
|
|
173
|
+
mask_truncated_completions=True,
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
{% endhint %}
|
|
177
|
+
|
|
178
|
+
You should see the reward increase overtime. We would recommend you train for at least 300 steps which may take 30 mins however, for optimal results, you should train for longer.
|
|
179
|
+
|
|
180
|
+
{% hint style="warning" %}
|
|
181
|
+
If you're having issues with your GRPO model not learning, we'd highly recommend to use our [Advanced GRPO notebooks](https://unsloth.ai/docs/unsloth-notebooks#grpo-reasoning-notebooks) as it has a much better reward function and you should see results much faster and frequently.
|
|
182
|
+
{% endhint %}
|
|
183
|
+
|
|
184
|
+
You will also see sample answers which allows you to see how the model is learning. Some may have steps, XML tags, attempts etc. and the idea is as trains it's going to get better and better because it's going to get scored higher and higher until we get the outputs we desire with long reasoning chains of answers.
|
|
185
|
+
|
|
186
|
+
<figure><img src="https://3215535692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2Fgit-blob-f33d6f494605ab9ca69a0b697ed5865dd3a30b18%2Fimage.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>
|
|
187
|
+
{% endstep %}
|
|
188
|
+
|
|
189
|
+
{% step %}
|
|
190
|
+
|
|
191
|
+
#### Run & Evaluate your model
|
|
192
|
+
|
|
193
|
+
Run your model by clicking the play button. In the first example, there is usually no reasoning in the answer and in order to see the reasoning, we need to first save the LoRA weights we just trained with GRPO first using:
|
|
194
|
+
|
|
195
|
+
<pre><code><strong>model.save_lora("grpo_saved_lora")
|
|
196
|
+
</strong></code></pre>
|
|
197
|
+
|
|
198
|
+
<figure><img src="https://3215535692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2Fgit-blob-1ab351622655983aeda4d9d6d217cf354cb280be%2Fimage%20(10)%20(1)%20(1).png?alt=media" alt=""><figcaption><p>The first inference example run has no reasoning. You must load the LoRA and test it to reveal the reasoning.</p></figcaption></figure>
|
|
199
|
+
|
|
200
|
+
Then we load the LoRA and test it. Our reasoning model is much better - it's not always correct, since we only trained it for an hour or so - it'll be better if we extend the sequence length and train for longer!
|
|
201
|
+
|
|
202
|
+
You can then save your model to GGUF, Ollama etc. by following our [guide here](https://unsloth.ai/docs/fine-tuning-llms-guide#id-7.-running--saving-the-model).
|
|
203
|
+
|
|
204
|
+
<figure><img src="https://3215535692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2Fgit-blob-38fa0c97184487aaa6b259f5b23b7f27345871d8%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>
|
|
205
|
+
|
|
206
|
+
If you are still not getting any reasoning, you may have either trained for too less steps or your reward function/verifier was not optimal.
|
|
207
|
+
{% endstep %}
|
|
208
|
+
|
|
209
|
+
{% step %}
|
|
210
|
+
|
|
211
|
+
#### Save your model
|
|
212
|
+
|
|
213
|
+
We have multiple options for saving your fine-tuned model, but we’ll focus on the easiest and most popular approaches which you can read more about [here](https://unsloth.ai/docs/basics/inference-and-deployment)
|
|
214
|
+
|
|
215
|
+
**Saving in 16-bit Precision**
|
|
216
|
+
|
|
217
|
+
You can save the model with 16-bit precision using the following command:
|
|
218
|
+
|
|
219
|
+
```python
|
|
220
|
+
# Save to 16-bit precision
|
|
221
|
+
model.save_pretrained_merged("model", tokenizer, save_method="merged_16bit")
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
**Pushing to Hugging Face Hub**
|
|
225
|
+
|
|
226
|
+
To share your model, we’ll push it to the Hugging Face Hub using the `push_to_hub_merged` method. This allows saving the model in multiple quantization formats.
|
|
227
|
+
|
|
228
|
+
```python
|
|
229
|
+
# Push to Hugging Face Hub (requires a token)
|
|
230
|
+
model.push_to_hub_merged(
|
|
231
|
+
"your-username/model-name", tokenizer, save_method="merged_16bit", token="your-token"
|
|
232
|
+
)
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
**Saving in GGUF Format for llama.cpp**
|
|
236
|
+
|
|
237
|
+
Unsloth also supports saving in **GGUF format**, making it compatible with **llama.cpp** and **Ollama**.
|
|
238
|
+
|
|
239
|
+
```python
|
|
240
|
+
model.push_to_hub_gguf(
|
|
241
|
+
"your-username/model-name",
|
|
242
|
+
tokeni
|
|
243
|
+
quantization_method=["q4_k_m", "q8_0", "q5_k_m"],
|
|
244
|
+
token="your-token",
|
|
245
|
+
)
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
Once saved in GGUF format, the model can be easily deployed in lightweight environments using **llama.cpp** or used in other inference engines.
|
|
249
|
+
{% endstep %}
|
|
250
|
+
{% endstepper %}
|
|
251
|
+
|
|
252
|
+
## Video Tutorials
|
|
253
|
+
|
|
254
|
+
Here are some video tutorials created by amazing YouTubers who we think are fantastic!
|
|
255
|
+
|
|
256
|
+
{% embed url="<https://www.youtube.com/watch?v=9t-BAjzBWj8>" %}
|
|
257
|
+
|
|
258
|
+
{% columns %}
|
|
259
|
+
{% column width="50%" %}
|
|
260
|
+
{% embed url="<https://www.youtube.com/watch?t=3289s&v=bbFEYPx9Hpo>" %}
|
|
261
|
+
Great to learn about how to prep your dataset and explanations behind Reinforcement Learning + GRPO basics
|
|
262
|
+
{% endembed %}
|
|
263
|
+
|
|
264
|
+
{% embed url="<https://www.youtube.com/watch?v=oF0_eMhzRaQ>" %}
|
|
265
|
+
{% endcolumn %}
|
|
266
|
+
|
|
267
|
+
{% column width="50%" %}
|
|
268
|
+
{% embed url="<https://www.youtube.com/watch?v=juOh1afy-IE>" %}
|
|
269
|
+
|
|
270
|
+
{% embed url="<https://www.youtube.com/watch?v=SoPE1cUz3Hs>" %}
|
|
271
|
+
Local GRPO on your own device
|
|
272
|
+
{% endembed %}
|
|
273
|
+
{% endcolumn %}
|