@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.
Files changed (339) hide show
  1. package/bin/skills/citation-management/SKILL.md +1109 -0
  2. package/bin/skills/citation-management/assets/bibtex_template.bib +264 -0
  3. package/bin/skills/citation-management/assets/citation_checklist.md +386 -0
  4. package/bin/skills/citation-management/references/bibtex_formatting.md +908 -0
  5. package/bin/skills/citation-management/references/citation_validation.md +794 -0
  6. package/bin/skills/citation-management/references/google_scholar_search.md +725 -0
  7. package/bin/skills/citation-management/references/metadata_extraction.md +870 -0
  8. package/bin/skills/citation-management/references/pubmed_search.md +839 -0
  9. package/bin/skills/citation-management/scripts/doi_to_bibtex.py +182 -0
  10. package/bin/skills/citation-management/scripts/extract_metadata.py +570 -0
  11. package/bin/skills/citation-management/scripts/format_bibtex.py +349 -0
  12. package/bin/skills/citation-management/scripts/search_google_scholar.py +251 -0
  13. package/bin/skills/citation-management/scripts/search_pubmed.py +348 -0
  14. package/bin/skills/citation-management/scripts/validate_citations.py +494 -0
  15. package/bin/skills/clinical-decision-support/README.md +129 -0
  16. package/bin/skills/clinical-decision-support/SKILL.md +506 -0
  17. package/bin/skills/clinical-decision-support/assets/biomarker_report_template.tex +380 -0
  18. package/bin/skills/clinical-decision-support/assets/clinical_pathway_template.tex +222 -0
  19. package/bin/skills/clinical-decision-support/assets/cohort_analysis_template.tex +359 -0
  20. package/bin/skills/clinical-decision-support/assets/color_schemes.tex +149 -0
  21. package/bin/skills/clinical-decision-support/assets/example_gbm_cohort.md +208 -0
  22. package/bin/skills/clinical-decision-support/assets/recommendation_strength_guide.md +328 -0
  23. package/bin/skills/clinical-decision-support/assets/treatment_recommendation_template.tex +529 -0
  24. package/bin/skills/clinical-decision-support/references/biomarker_classification.md +719 -0
  25. package/bin/skills/clinical-decision-support/references/clinical_decision_algorithms.md +604 -0
  26. package/bin/skills/clinical-decision-support/references/evidence_synthesis.md +840 -0
  27. package/bin/skills/clinical-decision-support/references/outcome_analysis.md +640 -0
  28. package/bin/skills/clinical-decision-support/references/patient_cohort_analysis.md +427 -0
  29. package/bin/skills/clinical-decision-support/references/treatment_recommendations.md +521 -0
  30. package/bin/skills/clinical-decision-support/scripts/biomarker_classifier.py +383 -0
  31. package/bin/skills/clinical-decision-support/scripts/build_decision_tree.py +417 -0
  32. package/bin/skills/clinical-decision-support/scripts/create_cohort_tables.py +509 -0
  33. package/bin/skills/clinical-decision-support/scripts/generate_survival_analysis.py +441 -0
  34. package/bin/skills/clinical-decision-support/scripts/validate_cds_document.py +326 -0
  35. package/bin/skills/clinical-reports/IMPLEMENTATION_SUMMARY.md +641 -0
  36. package/bin/skills/clinical-reports/README.md +236 -0
  37. package/bin/skills/clinical-reports/SKILL.md +1127 -0
  38. package/bin/skills/clinical-reports/assets/case_report_template.md +352 -0
  39. package/bin/skills/clinical-reports/assets/clinical_trial_csr_template.md +353 -0
  40. package/bin/skills/clinical-reports/assets/clinical_trial_sae_template.md +359 -0
  41. package/bin/skills/clinical-reports/assets/consult_note_template.md +305 -0
  42. package/bin/skills/clinical-reports/assets/discharge_summary_template.md +453 -0
  43. package/bin/skills/clinical-reports/assets/hipaa_compliance_checklist.md +395 -0
  44. package/bin/skills/clinical-reports/assets/history_physical_template.md +305 -0
  45. package/bin/skills/clinical-reports/assets/lab_report_template.md +309 -0
  46. package/bin/skills/clinical-reports/assets/pathology_report_template.md +249 -0
  47. package/bin/skills/clinical-reports/assets/quality_checklist.md +338 -0
  48. package/bin/skills/clinical-reports/assets/radiology_report_template.md +318 -0
  49. package/bin/skills/clinical-reports/assets/soap_note_template.md +253 -0
  50. package/bin/skills/clinical-reports/references/case_report_guidelines.md +570 -0
  51. package/bin/skills/clinical-reports/references/clinical_trial_reporting.md +693 -0
  52. package/bin/skills/clinical-reports/references/data_presentation.md +530 -0
  53. package/bin/skills/clinical-reports/references/diagnostic_reports_standards.md +629 -0
  54. package/bin/skills/clinical-reports/references/medical_terminology.md +588 -0
  55. package/bin/skills/clinical-reports/references/patient_documentation.md +744 -0
  56. package/bin/skills/clinical-reports/references/peer_review_standards.md +585 -0
  57. package/bin/skills/clinical-reports/references/regulatory_compliance.md +577 -0
  58. package/bin/skills/clinical-reports/scripts/check_deidentification.py +332 -0
  59. package/bin/skills/clinical-reports/scripts/compliance_checker.py +78 -0
  60. package/bin/skills/clinical-reports/scripts/extract_clinical_data.py +97 -0
  61. package/bin/skills/clinical-reports/scripts/format_adverse_events.py +97 -0
  62. package/bin/skills/clinical-reports/scripts/generate_report_template.py +149 -0
  63. package/bin/skills/clinical-reports/scripts/terminology_validator.py +126 -0
  64. package/bin/skills/clinical-reports/scripts/validate_case_report.py +323 -0
  65. package/bin/skills/clinical-reports/scripts/validate_trial_report.py +88 -0
  66. package/bin/skills/fireworks-ai/SKILL.md +665 -0
  67. package/bin/skills/generate-image/SKILL.md +178 -0
  68. package/bin/skills/generate-image/scripts/generate_image.py +254 -0
  69. package/bin/skills/groq/SKILL.md +347 -0
  70. package/bin/skills/hypothesis-generation/SKILL.md +293 -0
  71. package/bin/skills/hypothesis-generation/assets/FORMATTING_GUIDE.md +672 -0
  72. package/bin/skills/hypothesis-generation/assets/hypothesis_generation.sty +307 -0
  73. package/bin/skills/hypothesis-generation/assets/hypothesis_report_template.tex +572 -0
  74. package/bin/skills/hypothesis-generation/references/experimental_design_patterns.md +329 -0
  75. package/bin/skills/hypothesis-generation/references/hypothesis_quality_criteria.md +198 -0
  76. package/bin/skills/hypothesis-generation/references/literature_search_strategies.md +622 -0
  77. package/bin/skills/latex-posters/README.md +417 -0
  78. package/bin/skills/latex-posters/SKILL.md +1602 -0
  79. package/bin/skills/latex-posters/assets/baposter_template.tex +257 -0
  80. package/bin/skills/latex-posters/assets/beamerposter_template.tex +244 -0
  81. package/bin/skills/latex-posters/assets/poster_quality_checklist.md +358 -0
  82. package/bin/skills/latex-posters/assets/tikzposter_template.tex +251 -0
  83. package/bin/skills/latex-posters/references/latex_poster_packages.md +745 -0
  84. package/bin/skills/latex-posters/references/poster_content_guide.md +748 -0
  85. package/bin/skills/latex-posters/references/poster_design_principles.md +806 -0
  86. package/bin/skills/latex-posters/references/poster_layout_design.md +900 -0
  87. package/bin/skills/latex-posters/scripts/review_poster.sh +214 -0
  88. package/bin/skills/literature-review/SKILL.md +641 -0
  89. package/bin/skills/literature-review/assets/review_template.md +412 -0
  90. package/bin/skills/literature-review/references/citation_styles.md +166 -0
  91. package/bin/skills/literature-review/references/database_strategies.md +455 -0
  92. package/bin/skills/literature-review/scripts/generate_pdf.py +184 -0
  93. package/bin/skills/literature-review/scripts/search_databases.py +310 -0
  94. package/bin/skills/literature-review/scripts/verify_citations.py +218 -0
  95. package/bin/skills/market-research-reports/SKILL.md +904 -0
  96. package/bin/skills/market-research-reports/assets/FORMATTING_GUIDE.md +428 -0
  97. package/bin/skills/market-research-reports/assets/market_report_template.tex +1380 -0
  98. package/bin/skills/market-research-reports/assets/market_research.sty +564 -0
  99. package/bin/skills/market-research-reports/references/data_analysis_patterns.md +548 -0
  100. package/bin/skills/market-research-reports/references/report_structure_guide.md +999 -0
  101. package/bin/skills/market-research-reports/references/visual_generation_guide.md +1077 -0
  102. package/bin/skills/market-research-reports/scripts/generate_market_visuals.py +472 -0
  103. package/bin/skills/markitdown/INSTALLATION_GUIDE.md +318 -0
  104. package/bin/skills/markitdown/LICENSE.txt +22 -0
  105. package/bin/skills/markitdown/OPENROUTER_INTEGRATION.md +359 -0
  106. package/bin/skills/markitdown/QUICK_REFERENCE.md +309 -0
  107. package/bin/skills/markitdown/README.md +184 -0
  108. package/bin/skills/markitdown/SKILL.md +486 -0
  109. package/bin/skills/markitdown/SKILL_SUMMARY.md +307 -0
  110. package/bin/skills/markitdown/assets/example_usage.md +463 -0
  111. package/bin/skills/markitdown/references/api_reference.md +399 -0
  112. package/bin/skills/markitdown/references/file_formats.md +542 -0
  113. package/bin/skills/markitdown/scripts/batch_convert.py +195 -0
  114. package/bin/skills/markitdown/scripts/convert_literature.py +262 -0
  115. package/bin/skills/markitdown/scripts/convert_with_ai.py +224 -0
  116. package/bin/skills/ml-paper-writing/SKILL.md +937 -0
  117. package/bin/skills/ml-paper-writing/references/checklists.md +361 -0
  118. package/bin/skills/ml-paper-writing/references/citation-workflow.md +562 -0
  119. package/bin/skills/ml-paper-writing/references/reviewer-guidelines.md +367 -0
  120. package/bin/skills/ml-paper-writing/references/sources.md +159 -0
  121. package/bin/skills/ml-paper-writing/references/writing-guide.md +476 -0
  122. package/bin/skills/ml-paper-writing/templates/README.md +251 -0
  123. package/bin/skills/ml-paper-writing/templates/aaai2026/README.md +534 -0
  124. package/bin/skills/ml-paper-writing/templates/aaai2026/aaai2026-unified-supp.tex +144 -0
  125. package/bin/skills/ml-paper-writing/templates/aaai2026/aaai2026-unified-template.tex +952 -0
  126. package/bin/skills/ml-paper-writing/templates/aaai2026/aaai2026.bib +111 -0
  127. package/bin/skills/ml-paper-writing/templates/aaai2026/aaai2026.bst +1493 -0
  128. package/bin/skills/ml-paper-writing/templates/aaai2026/aaai2026.sty +315 -0
  129. package/bin/skills/ml-paper-writing/templates/acl/README.md +50 -0
  130. package/bin/skills/ml-paper-writing/templates/acl/acl.sty +312 -0
  131. package/bin/skills/ml-paper-writing/templates/acl/acl_latex.tex +377 -0
  132. package/bin/skills/ml-paper-writing/templates/acl/acl_lualatex.tex +101 -0
  133. package/bin/skills/ml-paper-writing/templates/acl/acl_natbib.bst +1940 -0
  134. package/bin/skills/ml-paper-writing/templates/acl/anthology.bib.txt +26 -0
  135. package/bin/skills/ml-paper-writing/templates/acl/custom.bib +70 -0
  136. package/bin/skills/ml-paper-writing/templates/acl/formatting.md +326 -0
  137. package/bin/skills/ml-paper-writing/templates/colm2025/README.md +3 -0
  138. package/bin/skills/ml-paper-writing/templates/colm2025/colm2025_conference.bib +11 -0
  139. package/bin/skills/ml-paper-writing/templates/colm2025/colm2025_conference.bst +1440 -0
  140. package/bin/skills/ml-paper-writing/templates/colm2025/colm2025_conference.pdf +0 -0
  141. package/bin/skills/ml-paper-writing/templates/colm2025/colm2025_conference.sty +218 -0
  142. package/bin/skills/ml-paper-writing/templates/colm2025/colm2025_conference.tex +305 -0
  143. package/bin/skills/ml-paper-writing/templates/colm2025/fancyhdr.sty +485 -0
  144. package/bin/skills/ml-paper-writing/templates/colm2025/math_commands.tex +508 -0
  145. package/bin/skills/ml-paper-writing/templates/colm2025/natbib.sty +1246 -0
  146. package/bin/skills/ml-paper-writing/templates/iclr2026/fancyhdr.sty +485 -0
  147. package/bin/skills/ml-paper-writing/templates/iclr2026/iclr2026_conference.bib +24 -0
  148. package/bin/skills/ml-paper-writing/templates/iclr2026/iclr2026_conference.bst +1440 -0
  149. package/bin/skills/ml-paper-writing/templates/iclr2026/iclr2026_conference.pdf +0 -0
  150. package/bin/skills/ml-paper-writing/templates/iclr2026/iclr2026_conference.sty +246 -0
  151. package/bin/skills/ml-paper-writing/templates/iclr2026/iclr2026_conference.tex +414 -0
  152. package/bin/skills/ml-paper-writing/templates/iclr2026/math_commands.tex +508 -0
  153. package/bin/skills/ml-paper-writing/templates/iclr2026/natbib.sty +1246 -0
  154. package/bin/skills/ml-paper-writing/templates/icml2026/algorithm.sty +79 -0
  155. package/bin/skills/ml-paper-writing/templates/icml2026/algorithmic.sty +201 -0
  156. package/bin/skills/ml-paper-writing/templates/icml2026/example_paper.bib +75 -0
  157. package/bin/skills/ml-paper-writing/templates/icml2026/example_paper.pdf +0 -0
  158. package/bin/skills/ml-paper-writing/templates/icml2026/example_paper.tex +662 -0
  159. package/bin/skills/ml-paper-writing/templates/icml2026/fancyhdr.sty +864 -0
  160. package/bin/skills/ml-paper-writing/templates/icml2026/icml2026.bst +1443 -0
  161. package/bin/skills/ml-paper-writing/templates/icml2026/icml2026.sty +767 -0
  162. package/bin/skills/ml-paper-writing/templates/icml2026/icml_numpapers.pdf +0 -0
  163. package/bin/skills/ml-paper-writing/templates/neurips2025/Makefile +36 -0
  164. package/bin/skills/ml-paper-writing/templates/neurips2025/extra_pkgs.tex +53 -0
  165. package/bin/skills/ml-paper-writing/templates/neurips2025/main.tex +38 -0
  166. package/bin/skills/ml-paper-writing/templates/neurips2025/neurips.sty +382 -0
  167. package/bin/skills/paper-2-web/SKILL.md +491 -0
  168. package/bin/skills/paper-2-web/references/installation.md +141 -0
  169. package/bin/skills/paper-2-web/references/paper2poster.md +346 -0
  170. package/bin/skills/paper-2-web/references/paper2video.md +305 -0
  171. package/bin/skills/paper-2-web/references/paper2web.md +187 -0
  172. package/bin/skills/paper-2-web/references/usage_examples.md +436 -0
  173. package/bin/skills/peer-review/SKILL.md +702 -0
  174. package/bin/skills/peer-review/references/calibration_guidelines.md +196 -0
  175. package/bin/skills/peer-review/references/common_issues.md +552 -0
  176. package/bin/skills/peer-review/references/paper_mechanics.md +269 -0
  177. package/bin/skills/peer-review/references/reporting_standards.md +290 -0
  178. package/bin/skills/peer-review/references/scoring_rubric.md +239 -0
  179. package/bin/skills/pptx-posters/SKILL.md +410 -0
  180. package/bin/skills/pptx-posters/assets/poster_html_template.html +257 -0
  181. package/bin/skills/pptx-posters/assets/poster_quality_checklist.md +358 -0
  182. package/bin/skills/pptx-posters/references/poster_content_guide.md +748 -0
  183. package/bin/skills/pptx-posters/references/poster_design_principles.md +806 -0
  184. package/bin/skills/pptx-posters/references/poster_layout_design.md +900 -0
  185. package/bin/skills/research-grants/README.md +285 -0
  186. package/bin/skills/research-grants/SKILL.md +938 -0
  187. package/bin/skills/research-grants/assets/budget_justification_template.md +453 -0
  188. package/bin/skills/research-grants/assets/nih_specific_aims_template.md +166 -0
  189. package/bin/skills/research-grants/assets/nsf_project_summary_template.md +92 -0
  190. package/bin/skills/research-grants/references/broader_impacts.md +392 -0
  191. package/bin/skills/research-grants/references/darpa_guidelines.md +636 -0
  192. package/bin/skills/research-grants/references/doe_guidelines.md +586 -0
  193. package/bin/skills/research-grants/references/nih_guidelines.md +851 -0
  194. package/bin/skills/research-grants/references/nsf_guidelines.md +570 -0
  195. package/bin/skills/research-grants/references/specific_aims_guide.md +458 -0
  196. package/bin/skills/research-lookup/README.md +156 -0
  197. package/bin/skills/research-lookup/SKILL.md +606 -0
  198. package/bin/skills/research-lookup/examples.py +174 -0
  199. package/bin/skills/research-lookup/lookup.py +187 -0
  200. package/bin/skills/research-lookup/research_lookup.py +483 -0
  201. package/bin/skills/research-lookup/scripts/research_lookup.py +483 -0
  202. package/bin/skills/scholar-evaluation/SKILL.md +289 -0
  203. package/bin/skills/scholar-evaluation/references/evaluation_framework.md +663 -0
  204. package/bin/skills/scholar-evaluation/scripts/calculate_scores.py +366 -0
  205. package/bin/skills/scientific-critical-thinking/SKILL.md +566 -0
  206. package/bin/skills/scientific-critical-thinking/references/common_biases.md +364 -0
  207. package/bin/skills/scientific-critical-thinking/references/evidence_hierarchy.md +484 -0
  208. package/bin/skills/scientific-critical-thinking/references/experimental_design.md +496 -0
  209. package/bin/skills/scientific-critical-thinking/references/logical_fallacies.md +478 -0
  210. package/bin/skills/scientific-critical-thinking/references/scientific_method.md +169 -0
  211. package/bin/skills/scientific-critical-thinking/references/statistical_pitfalls.md +506 -0
  212. package/bin/skills/scientific-schematics/QUICK_REFERENCE.md +207 -0
  213. package/bin/skills/scientific-schematics/README.md +327 -0
  214. package/bin/skills/scientific-schematics/SKILL.md +615 -0
  215. package/bin/skills/scientific-schematics/example_usage.sh +89 -0
  216. package/bin/skills/scientific-schematics/references/best_practices.md +559 -0
  217. package/bin/skills/scientific-schematics/scripts/generate_schematic.py +135 -0
  218. package/bin/skills/scientific-schematics/scripts/generate_schematic_ai.py +807 -0
  219. package/bin/skills/scientific-schematics/test_ai_generation.py +243 -0
  220. package/bin/skills/scientific-slides/SKILL.md +942 -0
  221. package/bin/skills/scientific-slides/assets/timing_guidelines.md +597 -0
  222. package/bin/skills/scientific-slides/references/data_visualization_slides.md +708 -0
  223. package/bin/skills/scientific-slides/references/presentation_structure.md +642 -0
  224. package/bin/skills/scientific-slides/references/slide_design_principles.md +849 -0
  225. package/bin/skills/scientific-slides/references/talk_types_guide.md +687 -0
  226. package/bin/skills/scientific-slides/references/visual_review_workflow.md +775 -0
  227. package/bin/skills/scientific-slides/scripts/generate_slide_image.py +143 -0
  228. package/bin/skills/scientific-slides/scripts/generate_slide_image_ai.py +748 -0
  229. package/bin/skills/scientific-slides/scripts/pdf_to_images.py +201 -0
  230. package/bin/skills/scientific-slides/scripts/slides_to_pdf.py +220 -0
  231. package/bin/skills/scientific-slides/scripts/validate_presentation.py +367 -0
  232. package/bin/skills/scientific-writing/SKILL.md +714 -0
  233. package/bin/skills/scientific-writing/assets/REPORT_FORMATTING_GUIDE.md +574 -0
  234. package/bin/skills/scientific-writing/assets/scientific_report.sty +606 -0
  235. package/bin/skills/scientific-writing/assets/scientific_report_template.tex +449 -0
  236. package/bin/skills/scientific-writing/references/citation_styles.md +720 -0
  237. package/bin/skills/scientific-writing/references/figures_tables.md +806 -0
  238. package/bin/skills/scientific-writing/references/imrad_structure.md +686 -0
  239. package/bin/skills/scientific-writing/references/professional_report_formatting.md +664 -0
  240. package/bin/skills/scientific-writing/references/reporting_guidelines.md +748 -0
  241. package/bin/skills/scientific-writing/references/writing_principles.md +824 -0
  242. package/bin/skills/tinker/SKILL.md +2 -3
  243. package/bin/skills/together-ai/SKILL.md +722 -0
  244. package/bin/skills/treatment-plans/README.md +488 -0
  245. package/bin/skills/treatment-plans/SKILL.md +1579 -0
  246. package/bin/skills/treatment-plans/assets/STYLING_QUICK_REFERENCE.md +185 -0
  247. package/bin/skills/treatment-plans/assets/chronic_disease_management_plan.tex +665 -0
  248. package/bin/skills/treatment-plans/assets/general_medical_treatment_plan.tex +547 -0
  249. package/bin/skills/treatment-plans/assets/medical_treatment_plan.sty +222 -0
  250. package/bin/skills/treatment-plans/assets/mental_health_treatment_plan.tex +774 -0
  251. package/bin/skills/treatment-plans/assets/one_page_treatment_plan.tex +193 -0
  252. package/bin/skills/treatment-plans/assets/pain_management_plan.tex +799 -0
  253. package/bin/skills/treatment-plans/assets/perioperative_care_plan.tex +753 -0
  254. package/bin/skills/treatment-plans/assets/quality_checklist.md +471 -0
  255. package/bin/skills/treatment-plans/assets/rehabilitation_treatment_plan.tex +756 -0
  256. package/bin/skills/treatment-plans/references/goal_setting_frameworks.md +411 -0
  257. package/bin/skills/treatment-plans/references/intervention_guidelines.md +507 -0
  258. package/bin/skills/treatment-plans/references/regulatory_compliance.md +476 -0
  259. package/bin/skills/treatment-plans/references/specialty_specific_guidelines.md +655 -0
  260. package/bin/skills/treatment-plans/references/treatment_plan_standards.md +485 -0
  261. package/bin/skills/treatment-plans/scripts/check_completeness.py +322 -0
  262. package/bin/skills/treatment-plans/scripts/generate_template.py +233 -0
  263. package/bin/skills/treatment-plans/scripts/timeline_generator.py +385 -0
  264. package/bin/skills/treatment-plans/scripts/validate_treatment_plan.py +369 -0
  265. package/bin/skills/unsloth/SKILL.md +565 -47
  266. package/bin/skills/unsloth/docs/advanced-rl.md +222 -0
  267. package/bin/skills/unsloth/docs/chat-templates.md +141 -0
  268. package/bin/skills/unsloth/docs/datasets.md +489 -0
  269. package/bin/skills/unsloth/docs/docker-extended.md +99 -0
  270. package/bin/skills/unsloth/docs/dynamic-ggufs-2.0.md +116 -0
  271. package/bin/skills/unsloth/docs/dynamic-ggufs-aider.md +118 -0
  272. package/bin/skills/unsloth/docs/faq.md +91 -0
  273. package/bin/skills/unsloth/docs/fp16-vs-bf16.md +61 -0
  274. package/bin/skills/unsloth/docs/fp8-rl.md +224 -0
  275. package/bin/skills/unsloth/docs/glm-4.7-flash.md +997 -0
  276. package/bin/skills/unsloth/docs/inference-deployment-overview.md +17 -0
  277. package/bin/skills/unsloth/docs/inference.md +27 -0
  278. package/bin/skills/unsloth/docs/installation-docker.md +155 -0
  279. package/bin/skills/unsloth/docs/installation-pip.md +148 -0
  280. package/bin/skills/unsloth/docs/kernels-packing.md +190 -0
  281. package/bin/skills/unsloth/docs/kimi-k2.5.md +634 -0
  282. package/bin/skills/unsloth/docs/lm-studio.md +235 -0
  283. package/bin/skills/unsloth/docs/lora-hot-swapping.md +75 -0
  284. package/bin/skills/unsloth/docs/lora-hyperparameters.md +363 -0
  285. package/bin/skills/unsloth/docs/memory-efficient-rl.md +267 -0
  286. package/bin/skills/unsloth/docs/model-selection.md +70 -0
  287. package/bin/skills/unsloth/docs/models.md +532 -0
  288. package/bin/skills/unsloth/docs/multi-gpu-ddp.md +90 -0
  289. package/bin/skills/unsloth/docs/notebooks.md +223 -0
  290. package/bin/skills/unsloth/docs/overview.md +110 -0
  291. package/bin/skills/unsloth/docs/qwen3-coder-next-extended.md +900 -0
  292. package/bin/skills/unsloth/docs/qwen3-coder-next.md +900 -0
  293. package/bin/skills/unsloth/docs/requirements.md +45 -0
  294. package/bin/skills/unsloth/docs/reward-hacking.md +25 -0
  295. package/bin/skills/unsloth/docs/saving-to-gguf.md +138 -0
  296. package/bin/skills/unsloth/docs/saving-to-ollama.md +46 -0
  297. package/bin/skills/unsloth/docs/sglang-guide.md +278 -0
  298. package/bin/skills/unsloth/docs/speculative-decoding.md +70 -0
  299. package/bin/skills/unsloth/docs/tool-calling.md +334 -0
  300. package/bin/skills/unsloth/docs/troubleshooting-faq.md +204 -0
  301. package/bin/skills/unsloth/docs/troubleshooting-inference.md +26 -0
  302. package/bin/skills/unsloth/docs/tts-fine-tuning.md +149 -0
  303. package/bin/skills/unsloth/docs/tutorial-grpo.md +273 -0
  304. package/bin/skills/unsloth/docs/tutorial-llama3-ollama.md +356 -0
  305. package/bin/skills/unsloth/docs/vision-fine-tuning.md +135 -0
  306. package/bin/skills/unsloth/docs/vision-rl.md +170 -0
  307. package/bin/skills/unsloth/docs/vllm-engine-arguments.md +43 -0
  308. package/bin/skills/unsloth/docs/vllm-guide.md +98 -0
  309. package/bin/skills/venue-templates/SKILL.md +686 -0
  310. package/bin/skills/venue-templates/assets/examples/cell_summary_example.md +247 -0
  311. package/bin/skills/venue-templates/assets/examples/medical_structured_abstract.md +313 -0
  312. package/bin/skills/venue-templates/assets/examples/nature_abstract_examples.md +213 -0
  313. package/bin/skills/venue-templates/assets/examples/neurips_introduction_example.md +245 -0
  314. package/bin/skills/venue-templates/assets/grants/nih_specific_aims.tex +235 -0
  315. package/bin/skills/venue-templates/assets/grants/nsf_proposal_template.tex +375 -0
  316. package/bin/skills/venue-templates/assets/journals/nature_article.tex +171 -0
  317. package/bin/skills/venue-templates/assets/journals/neurips_article.tex +283 -0
  318. package/bin/skills/venue-templates/assets/journals/plos_one.tex +317 -0
  319. package/bin/skills/venue-templates/assets/posters/beamerposter_academic.tex +311 -0
  320. package/bin/skills/venue-templates/references/cell_press_style.md +483 -0
  321. package/bin/skills/venue-templates/references/conferences_formatting.md +564 -0
  322. package/bin/skills/venue-templates/references/cs_conference_style.md +463 -0
  323. package/bin/skills/venue-templates/references/grants_requirements.md +787 -0
  324. package/bin/skills/venue-templates/references/journals_formatting.md +486 -0
  325. package/bin/skills/venue-templates/references/medical_journal_styles.md +535 -0
  326. package/bin/skills/venue-templates/references/ml_conference_style.md +556 -0
  327. package/bin/skills/venue-templates/references/nature_science_style.md +405 -0
  328. package/bin/skills/venue-templates/references/posters_guidelines.md +628 -0
  329. package/bin/skills/venue-templates/references/reviewer_expectations.md +417 -0
  330. package/bin/skills/venue-templates/references/venue_writing_styles.md +321 -0
  331. package/bin/skills/venue-templates/scripts/customize_template.py +195 -0
  332. package/bin/skills/venue-templates/scripts/query_template.py +266 -0
  333. package/bin/skills/venue-templates/scripts/validate_format.py +250 -0
  334. package/bin/synsc +0 -0
  335. package/package.json +1 -1
  336. package/bin/skills/unsloth/references/index.md +0 -7
  337. package/bin/skills/unsloth/references/llms-full.md +0 -16799
  338. package/bin/skills/unsloth/references/llms-txt.md +0 -12044
  339. package/bin/skills/unsloth/references/llms.md +0 -82
@@ -0,0 +1,334 @@
1
+ # Tool Calling Guide for Local LLMs
2
+
3
+ Tool calling is when a LLM is allowed to trigger specific functions (like "search my files," "run a calculator," or "call an API") by emitting a structured request instead of guessing the answer in text. You use tool calls because they make outputs **more reliable and up-to-date**, and they let the model **take real actions** (query systems, validate facts, enforce schemas) rather than hallucinating.
4
+
5
+ In this tutorial, you will learn how to use local LLMs via Tool Calling with Mathematical, story, Python code and terminal function examples. Inference is done locally via llama.cpp, llama-server and OpenAI endpoints.
6
+
7
+ Our guide should work for nearly any model including:
8
+
9
+ * **Qwen3-Coder-Next**, Qwen3-Coder, and other **Qwen** models
10
+ * **GLM-4.7**, GLM-4.7-Flash and **Kimi K2.5**, Kimi K2 Thinking
11
+ * **DeepSeek-V3.1**, DeepSeek-V3.2 and **MiniMax**
12
+ * **gpt-oss** and **NVIDIA Nemotron 3 Nano** and **Devstral 2**
13
+
14
+ ## Tool Calling Setup
15
+
16
+ Our first step is to obtain the latest `llama.cpp` on GitHub. You can follow the build instructions below as well. Change `-DGGML_CUDA=ON` to `-DGGML_CUDA=OFF` if you don't have a GPU or just want CPU inference.
17
+
18
+ ```bash
19
+ apt-get update
20
+ apt-get install pciutils build-essential cmake curl libcurl4-openssl-dev -y
21
+ git clone https://github.com/ggml-org/llama.cpp
22
+ cmake llama.cpp -B llama.cpp/build \
23
+ -DBUILD_SHARED_LIBS=OFF -DGGML_CUDA=ON
24
+ cmake --build llama.cpp/build --config Release -j --clean-first --target llama-cli llama-mtmd-cli llama-server llama-gguf-split
25
+ cp llama.cpp/build/bin/llama-* llama.cpp
26
+ ```
27
+
28
+ In a new terminal, we create some tools like adding 2 numbers, executing Python code, executing Linux functions and much more:
29
+
30
+ ```python
31
+ import json, subprocess, random
32
+ from typing import Any
33
+
34
+ def add_number(a: float | str, b: float | str) -> float:
35
+ return float(a) + float(b)
36
+
37
+ def multiply_number(a: float | str, b: float | str) -> float:
38
+ return float(a) * float(b)
39
+
40
+ def substract_number(a: float | str, b: float | str) -> float:
41
+ return float(a) - float(b)
42
+
43
+ def write_a_story() -> str:
44
+ return random.choice([
45
+ "A long time ago in a galaxy far far away...",
46
+ "There were 2 friends who loved sloths and code...",
47
+ "The world was ending because every sloth evolved to have superhuman intelligence...",
48
+ "Unbeknownst to one friend, the other accidentally coded a program to evolve sloths...",
49
+ ])
50
+
51
+ def terminal(command: str) -> str:
52
+ if "rm" in command or "sudo" in command or "dd" in command or "chmod" in command:
53
+ msg = "Cannot execute 'rm, sudo, dd, chmod' commands since they are dangerous"
54
+ print(msg); return msg
55
+ print(f"Executing terminal command `{command}`")
56
+ try:
57
+ return str(subprocess.run(command, capture_output = True, text = True, shell = True, check = True).stdout)
58
+ except subprocess.CalledProcessError as e:
59
+ return f"Command failed: {e.stderr}"
60
+
61
+ def python(code: str) -> str:
62
+ data = {}
63
+ exec(code, data)
64
+ del data["__builtins__"]
65
+ return str(data)
66
+
67
+ MAP_FN = {
68
+ "add_number": add_number,
69
+ "multiply_number": multiply_number,
70
+ "substract_number": substract_number,
71
+ "write_a_story": write_a_story,
72
+ "terminal": terminal,
73
+ "python": python,
74
+ }
75
+
76
+ tools = [
77
+ {
78
+ "type": "function",
79
+ "function": {
80
+ "name": "add_number",
81
+ "description": "Add two numbers.",
82
+ "parameters": {
83
+ "type": "object",
84
+ "properties": {
85
+ "a": {"type": "string", "description": "The first number."},
86
+ "b": {"type": "string", "description": "The second number."},
87
+ },
88
+ "required": ["a", "b"],
89
+ },
90
+ },
91
+ },
92
+ {
93
+ "type": "function",
94
+ "function": {
95
+ "name": "multiply_number",
96
+ "description": "Multiply two numbers.",
97
+ "parameters": {
98
+ "type": "object",
99
+ "properties": {
100
+ "a": {"type": "string", "description": "The first number."},
101
+ "b": {"type": "string", "description": "The second number."},
102
+ },
103
+ "required": ["a", "b"],
104
+ },
105
+ },
106
+ },
107
+ {
108
+ "type": "function",
109
+ "function": {
110
+ "name": "substract_number",
111
+ "description": "Substract two numbers.",
112
+ "parameters": {
113
+ "type": "object",
114
+ "properties": {
115
+ "a": {"type": "string", "description": "The first number."},
116
+ "b": {"type": "string", "description": "The second number."},
117
+ },
118
+ "required": ["a", "b"],
119
+ },
120
+ },
121
+ },
122
+ {
123
+ "type": "function",
124
+ "function": {
125
+ "name": "write_a_story",
126
+ "description": "Writes a random story.",
127
+ "parameters": {"type": "object", "properties": {}, "required": []},
128
+ },
129
+ },
130
+ {
131
+ "type": "function",
132
+ "function": {
133
+ "name": "terminal",
134
+ "description": "Perform operations from the terminal.",
135
+ "parameters": {
136
+ "type": "object",
137
+ "properties": {
138
+ "command": {"type": "string", "description": "The command you wish to launch, e.g `ls`, `rm`, ..."},
139
+ },
140
+ "required": ["command"],
141
+ },
142
+ },
143
+ },
144
+ {
145
+ "type": "function",
146
+ "function": {
147
+ "name": "python",
148
+ "description": "Call a Python interpreter with some Python code that will be ran.",
149
+ "parameters": {
150
+ "type": "object",
151
+ "properties": {
152
+ "code": {"type": "string", "description": "The Python code to run"},
153
+ },
154
+ "required": ["code"],
155
+ },
156
+ },
157
+ },
158
+ ]
159
+ ```
160
+
161
+ ## Inference Function
162
+
163
+ We use the below functions which will parse the function calls automatically and call the OpenAI endpoint for any model:
164
+
165
+ ```python
166
+ from openai import OpenAI
167
+
168
+ def unsloth_inference(
169
+ messages,
170
+ temperature = 0.7,
171
+ top_p = 0.95,
172
+ top_k = 40,
173
+ min_p = 0.01,
174
+ repetition_penalty = 1.0,
175
+ ):
176
+ messages = messages.copy()
177
+ openai_client = OpenAI(
178
+ base_url = "http://127.0.0.1:8001/v1",
179
+ api_key = "sk-no-key-required",
180
+ )
181
+ model_name = next(iter(openai_client.models.list())).id
182
+ print(f"Using model = {model_name}")
183
+ has_tool_calls = True
184
+ original_messages_len = len(messages)
185
+ while has_tool_calls:
186
+ print(f"Current messages = {messages}")
187
+ response = openai_client.chat.completions.create(
188
+ model = model_name,
189
+ messages = messages,
190
+ temperature = temperature,
191
+ top_p = top_p,
192
+ tools = tools if tools else None,
193
+ tool_choice = "auto" if tools else None,
194
+ extra_body = {"top_k": top_k, "min_p": min_p, "repetition_penalty": repetition_penalty}
195
+ )
196
+ tool_calls = response.choices[0].message.tool_calls or []
197
+ content = response.choices[0].message.content or ""
198
+ tool_calls_dict = [tc.to_dict() for tc in tool_calls] if tool_calls else tool_calls
199
+ messages.append({"role": "assistant", "tool_calls": tool_calls_dict, "content": content})
200
+ for tool_call in tool_calls:
201
+ fx, args, _id = tool_call.function.name, tool_call.function.arguments, tool_call.id
202
+ out = MAP_FN[fx](**json.loads(args))
203
+ messages.append({"role": "tool", "tool_call_id": _id, "name": fx, "content": str(out)})
204
+ else:
205
+ has_tool_calls = False
206
+ return messages
207
+ ```
208
+
209
+ ## Examples
210
+
211
+ ### Writing a story
212
+
213
+ ```python
214
+ messages = [{
215
+ "role": "user",
216
+ "content": [{"type": "text", "text": "Could you write me a story ?"}],
217
+ }]
218
+ unsloth_inference(messages, temperature = 0.15, top_p = 1.0, top_k = -1, min_p = 0.00)
219
+ ```
220
+
221
+ ### Mathematical operations
222
+
223
+ ```python
224
+ messages = [{
225
+ "role": "user",
226
+ "content": [{"type": "text", "text": "What is today's date plus 3 days?"}],
227
+ }]
228
+ unsloth_inference(messages, temperature = 0.15, top_p = 1.0, top_k = -1, min_p = 0.00)
229
+ ```
230
+
231
+ ### Execute generated Python code
232
+
233
+ ```python
234
+ messages = [{
235
+ "role": "user",
236
+ "content": [{"type": "text", "text": "Create a Fibonacci function in Python and find fib(20)."}],
237
+ }]
238
+ unsloth_inference(messages, temperature = 0.15, top_p = 1.0, top_k = -1, min_p = 0.00)
239
+ ```
240
+
241
+ ### Execute arbitrary terminal functions
242
+
243
+ ```python
244
+ messages = [{
245
+ "role": "user",
246
+ "content": [{"type": "text", "text": "Write 'I'm a happy Sloth' to a file, then print it back to me."}],
247
+ }]
248
+ messages = unsloth_inference(messages, temperature = 0.15, top_p = 1.0, top_k = -1, min_p = 0.00)
249
+ ```
250
+
251
+ ## Qwen3-Coder-Next Tool Calling
252
+
253
+ Use Qwen3-Coder-Next's optimal parameters of `temperature = 1.0, top_p = 0.95, top_k = 40`.
254
+
255
+ ```python
256
+ messages = [{
257
+ "role": "user",
258
+ "content": [{"type": "text", "text": "Create a Fibonacci function in Python and find fib(20)."}],
259
+ }]
260
+ unsloth_inference(messages, temperature = 1.0, top_p = 0.95, top_k = 40, min_p = 0.00)
261
+ ```
262
+
263
+ ## GLM-4.7-Flash + GLM 4.7 Tool Calling
264
+
265
+ We first download GLM-4.7 via some Python code, then launch it via llama-server in a separate terminal:
266
+
267
+ ```python
268
+ # !pip install huggingface_hub hf_transfer
269
+ import os
270
+ os.environ["HF_HUB_ENABLE_HF_TRANSFER"] = "1"
271
+ from huggingface_hub import snapshot_download
272
+ snapshot_download(
273
+ repo_id = "unsloth/GLM-4.7-GGUF",
274
+ local_dir = "unsloth/GLM-4.7-GGUF",
275
+ allow_patterns = ["*UD-Q2_K_XL*"],
276
+ )
277
+ ```
278
+
279
+ Now launch it via llama-server:
280
+
281
+ ```bash
282
+ ./llama.cpp/llama-server \
283
+ --model unsloth/GLM-4.7-GGUF/UD-Q2_K_XL/GLM-4.7-UD-Q2_K_XL-00001-of-00003.gguf \
284
+ --alias "unsloth/GLM-4.7" \
285
+ --threads -1 \
286
+ --fit on \
287
+ --prio 3 \
288
+ --min_p 0.01 \
289
+ --ctx-size 16384 \
290
+ --port 8001 \
291
+ --jinja
292
+ ```
293
+
294
+ Use GLM 4.7's optimal parameters of `temperature = 0.7` and `top_p = 1.0`:
295
+
296
+ ```python
297
+ messages = [{
298
+ "role": "user",
299
+ "content": [{"type": "text", "text": "What is today's date plus 3 days?"}],
300
+ }]
301
+ unsloth_inference(messages, temperature = 0.7, top_p = 1.0, top_k = -1, min_p = 0.00)
302
+ ```
303
+
304
+ ## Devstral 2 Tool Calling
305
+
306
+ We first download Devstral 2 via some Python code, then launch it via llama-server:
307
+
308
+ ```python
309
+ # !pip install huggingface_hub hf_transfer
310
+ import os
311
+ os.environ["HF_HUB_ENABLE_HF_TRANSFER"] = "1"
312
+ from huggingface_hub import snapshot_download
313
+ snapshot_download(
314
+ repo_id = "unsloth/Devstral-Small-2-24B-Instruct-2512-GGUF",
315
+ local_dir = "unsloth/Devstral-Small-2-24B-Instruct-2512-GGUF",
316
+ allow_patterns = ["*UD-Q4_K_XL*", "*mmproj-F16*"],
317
+ )
318
+ ```
319
+
320
+ ```bash
321
+ ./llama.cpp/llama-server \
322
+ --model unsloth/Devstral-Small-2-24B-Instruct-2512-GGUF/Devstral-Small-2-24B-Instruct-2512-UD-Q4_K_XL.gguf \
323
+ --mmproj unsloth/Devstral-Small-2-24B-Instruct-2512-GGUF/mmproj-F16.gguf \
324
+ --alias "unsloth/Devstral-Small-2-24B-Instruct-2512" \
325
+ --threads -1 \
326
+ --fit on \
327
+ --prio 3 \
328
+ --min_p 0.01 \
329
+ --ctx-size 16384 \
330
+ --port 8001 \
331
+ --jinja
332
+ ```
333
+
334
+ Use Devstral's suggested parameters of `temperature = 0.15`.
@@ -0,0 +1,204 @@
1
+ # Troubleshooting & FAQs
2
+
3
+ If you're still encountering any issues with versions or dependencies, please use our [Docker image](installation-docker.md) which will have everything pre-installed.
4
+
5
+ > **Try always to update Unsloth if you find any issues.**
6
+ > `pip install --upgrade --force-reinstall --no-cache-dir --no-deps unsloth unsloth_zoo`
7
+
8
+ ## Fine-tuning a new model not supported by Unsloth?
9
+
10
+ Unsloth works with any model supported by `transformers`. If a model isn't in our uploads or doesn't run out of the box, it's usually still supported. Enable compatibility by setting `trust_remote_code=True`:
11
+
12
+ ```python
13
+ model, tokenizer = FastVisionModel.from_pretrained(
14
+ "./deepseek_ocr",
15
+ load_in_4bit = False,
16
+ auto_model = AutoModel,
17
+ trust_remote_code = True,
18
+ unsloth_force_compile = True,
19
+ use_gradient_checkpointing = "unsloth",
20
+ )
21
+ ```
22
+
23
+ ## Running in Unsloth works well, but after exporting & running on other platforms, the results are poor
24
+
25
+ * The most common cause is using an **incorrect chat template**. Use the SAME template for training and inference.
26
+ * You must use the correct `eos token`.
27
+ * Check if your inference engine adds an unnecessary "start of sequence" token.
28
+ * **Use our conversational notebooks to force the chat template - this will fix most issues.**
29
+
30
+ ## Saving to GGUF / vLLM 16bit crashes
31
+
32
+ Reduce `maximum_memory_usage`:
33
+ `model.save_pretrained(..., maximum_memory_usage = 0.5)` (default is 0.75).
34
+
35
+ ## How do I manually save to GGUF?
36
+
37
+ ```python
38
+ model.save_pretrained_merged("merged_model", tokenizer, save_method = "merged_16bit")
39
+ ```
40
+
41
+ ```bash
42
+ apt-get update
43
+ apt-get install pciutils build-essential cmake curl libcurl4-openssl-dev -y
44
+ git clone https://github.com/ggerganov/llama.cpp
45
+ cmake llama.cpp -B llama.cpp/build \
46
+ -DBUILD_SHARED_LIBS=ON -DGGML_CUDA=ON -DLLAMA_CURL=ON
47
+ cmake --build llama.cpp/build --config Release -j --clean-first --target llama-quantize llama-cli llama-gguf-split llama-mtmd-cli
48
+ cp llama.cpp/build/bin/llama-* llama.cpp
49
+
50
+ python llama.cpp/convert_hf_to_gguf.py merged_model \
51
+ --outfile model-F16.gguf --outtype f16 --split-max-size 50G
52
+
53
+ # For BF16:
54
+ python llama.cpp/convert_hf_to_gguf.py merged_model \
55
+ --outfile model-BF16.gguf --outtype bf16 --split-max-size 50G
56
+
57
+ # For Q8_0:
58
+ python llama.cpp/convert_hf_to_gguf.py merged_model \
59
+ --outfile model-Q8_0.gguf --outtype q8_0 --split-max-size 50G
60
+ ```
61
+
62
+ ## Why is Q8_K_XL slower than Q8_0 GGUF?
63
+
64
+ On Mac devices, BF16 might be slower than F16. Q8_K_XL upcasts some layers to BF16. We are actively changing to make F16 the default.
65
+
66
+ ## How to do Evaluation
67
+
68
+ Split your dataset into training and test splits (always shuffle!):
69
+
70
+ ```python
71
+ new_dataset = dataset.train_test_split(
72
+ test_size = 0.01,
73
+ shuffle = True,
74
+ seed = 3407,
75
+ )
76
+ train_dataset = new_dataset["train"]
77
+ eval_dataset = new_dataset["test"]
78
+ ```
79
+
80
+ ```python
81
+ from trl import SFTTrainer, SFTConfig
82
+ trainer = SFTTrainer(
83
+ args = SFTConfig(
84
+ fp16_full_eval = True,
85
+ per_device_eval_batch_size = 2,
86
+ eval_accumulation_steps = 4,
87
+ eval_strategy = "steps",
88
+ eval_steps = 1,
89
+ ),
90
+ train_dataset = new_dataset["train"],
91
+ eval_dataset = new_dataset["test"],
92
+ )
93
+ ```
94
+
95
+ ## How do I do Early Stopping?
96
+
97
+ ```python
98
+ from trl import SFTConfig, SFTTrainer
99
+ trainer = SFTTrainer(
100
+ args = SFTConfig(
101
+ fp16_full_eval = True,
102
+ per_device_eval_batch_size = 2,
103
+ eval_accumulation_steps = 4,
104
+ output_dir = "training_checkpoints",
105
+ save_strategy = "steps",
106
+ save_steps = 10,
107
+ save_total_limit = 3,
108
+ eval_strategy = "steps",
109
+ eval_steps = 10,
110
+ load_best_model_at_end = True,
111
+ metric_for_best_model = "eval_loss",
112
+ greater_is_better = False,
113
+ ),
114
+ )
115
+
116
+ from transformers import EarlyStoppingCallback
117
+ early_stopping_callback = EarlyStoppingCallback(
118
+ early_stopping_patience = 3,
119
+ early_stopping_threshold = 0.0,
120
+ )
121
+ trainer.add_callback(early_stopping_callback)
122
+ trainer.train()
123
+ ```
124
+
125
+ ## Evaluation Loop - Out of Memory or crashing
126
+
127
+ Set batch size lower than 2 and use `fp16_full_eval=True` to cut memory by 1/2.
128
+
129
+ ## Downloading gets stuck at 90 to 95%
130
+
131
+ ```python
132
+ import os
133
+ os.environ["UNSLOTH_STABLE_DOWNLOADS"] = "1"
134
+ from unsloth import FastLanguageModel
135
+ ```
136
+
137
+ ## RuntimeError: CUDA error: device-side assert triggered
138
+
139
+ ```python
140
+ import os
141
+ os.environ["UNSLOTH_COMPILE_DISABLE"] = "1"
142
+ os.environ["UNSLOTH_DISABLE_FAST_GENERATION"] = "1"
143
+ ```
144
+
145
+ ## All labels in your dataset are -100
146
+
147
+ This means `train_on_responses_only` is incorrect for that model.
148
+
149
+ For Llama 3.1/3.2/3.3:
150
+ ```python
151
+ from unsloth.chat_templates import train_on_responses_only
152
+ trainer = train_on_responses_only(
153
+ trainer,
154
+ instruction_part = "<|start_header_id|>user<|end_header_id|>\n\n",
155
+ response_part = "<|start_header_id|>assistant<|end_header_id|>\n\n",
156
+ )
157
+ ```
158
+
159
+ For Gemma 2/3/3n:
160
+ ```python
161
+ from unsloth.chat_templates import train_on_responses_only
162
+ trainer = train_on_responses_only(
163
+ trainer,
164
+ instruction_part = "<start_of_turn>user\n",
165
+ response_part = "<start_of_turn>model\n",
166
+ )
167
+ ```
168
+
169
+ ## Unsloth is slower than expected?
170
+
171
+ `torch.compile` typically takes ~5 minutes to warm up. Measure throughput **after** it's fully loaded. To disable:
172
+
173
+ ```python
174
+ import os
175
+ os.environ["UNSLOTH_COMPILE_DISABLE"] = "1"
176
+ ```
177
+
178
+ ## Some weights were not initialized from model checkpoint
179
+
180
+ Fix by upgrading:
181
+
182
+ ```bash
183
+ pip install --upgrade --force-reinstall --no-cache-dir --no-deps unsloth unsloth_zoo
184
+ pip install --upgrade --force-reinstall --no-cache-dir --no-deps transformers timm
185
+ ```
186
+
187
+ ## NotImplementedError: A UTF-8 locale is required. Got ANSI
188
+
189
+ ```python
190
+ import locale
191
+ locale.getpreferredencoding = lambda: "UTF-8"
192
+ ```
193
+
194
+ ## Citing Unsloth
195
+
196
+ ```bibtex
197
+ @misc{unsloth,
198
+ author = {Unsloth AI and Han-Chen, Daniel and Han-Chen, Michael},
199
+ title = {Unsloth},
200
+ year = {2025},
201
+ publisher = {Github},
202
+ howpublished = {\url{https://github.com/unslothai/unsloth}}
203
+ }
204
+ ```
@@ -0,0 +1,26 @@
1
+ # Troubleshooting Inference
2
+
3
+ ### Running in Unsloth works well, but after exporting & running on other platforms, the results are poor
4
+
5
+ You might sometimes encounter an issue where your model runs and produces good results on Unsloth, but when you use it on another platform like Ollama or vLLM, the results are poor or you might get gibberish, endless/infinite generations or repeated outputs.
6
+
7
+ * The most common cause of this error is using an **incorrect chat template**. It's essential to use the SAME chat template that was used when training the model in Unsloth and later when you run it in another framework, such as llama.cpp or Ollama. When inferencing from a saved model, it's crucial to apply the correct template.
8
+ * You must use the correct `eos token`. If not, you might get gibberish on longer generations.
9
+ * It might also be because your inference engine adds an unnecessary "start of sequence" token (or the lack of thereof on the contrary) so ensure you check both hypotheses!
10
+ * **Use our conversational notebooks to force the chat template - this will fix most issues.**
11
+ * Qwen-3 14B Conversational notebook [Open in Colab](https://colab.research.google.com/github/unslothai/notebooks/blob/main/nb/Qwen3_(14B)-Reasoning-Conversational.ipynb)
12
+ * Gemma-3 4B Conversational notebook [Open in Colab](https://colab.research.google.com/github/unslothai/notebooks/blob/main/nb/Gemma3_(4B).ipynb)
13
+ * Llama-3.2 3B Conversational notebook [Open in Colab](https://colab.research.google.com/github/unslothai/notebooks/blob/main/nb/Llama3.2_(1B_and_3B)-Conversational.ipynb)
14
+ * Phi-4 14B Conversational notebook [Open in Colab](https://colab.research.google.com/github/unslothai/notebooks/blob/main/nb/Phi_4-Conversational.ipynb)
15
+ * Mistral v0.3 7B Conversational notebook [Open in Colab](https://colab.research.google.com/github/unslothai/notebooks/blob/main/nb/Mistral_v0.3_(7B)-Conversational.ipynb)
16
+ * **More notebooks in our [notebooks repo](https://github.com/unslothai/notebooks).**
17
+
18
+ ### Saving to `safetensors`, not `bin` format in Colab
19
+
20
+ We save to `.bin` in Colab so it's like 4x faster, but set `safe_serialization = None` to force saving to `.safetensors`. So `model.save_pretrained(..., safe_serialization = None)` or `model.push_to_hub(..., safe_serialization = None)`
21
+
22
+ ### If saving to GGUF or vLLM 16bit crashes
23
+
24
+ You can try reducing the maximum GPU usage during saving by changing `maximum_memory_usage`.
25
+
26
+ The default is `model.save_pretrained(..., maximum_memory_usage = 0.75)`. Reduce it to say 0.5 to use 50% of GPU peak memory or lower. This can reduce OOM crashes during saving.