axolotl 0.14.0__tar.gz

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 (416) hide show
  1. axolotl-0.14.0/LICENSE +202 -0
  2. axolotl-0.14.0/MANIFEST.in +6 -0
  3. axolotl-0.14.0/PKG-INFO +295 -0
  4. axolotl-0.14.0/README.md +188 -0
  5. axolotl-0.14.0/VERSION +1 -0
  6. axolotl-0.14.0/pyproject.toml +65 -0
  7. axolotl-0.14.0/requirements.txt +75 -0
  8. axolotl-0.14.0/setup.cfg +4 -0
  9. axolotl-0.14.0/setup.py +211 -0
  10. axolotl-0.14.0/src/axolotl/__init__.py +11 -0
  11. axolotl-0.14.0/src/axolotl/cli/__init__.py +10 -0
  12. axolotl-0.14.0/src/axolotl/cli/args.py +134 -0
  13. axolotl-0.14.0/src/axolotl/cli/art.py +30 -0
  14. axolotl-0.14.0/src/axolotl/cli/checks.py +54 -0
  15. axolotl-0.14.0/src/axolotl/cli/cloud/__init__.py +74 -0
  16. axolotl-0.14.0/src/axolotl/cli/cloud/base.py +27 -0
  17. axolotl-0.14.0/src/axolotl/cli/cloud/baseten/__init__.py +48 -0
  18. axolotl-0.14.0/src/axolotl/cli/cloud/modal_.py +317 -0
  19. axolotl-0.14.0/src/axolotl/cli/config.py +272 -0
  20. axolotl-0.14.0/src/axolotl/cli/delinearize_llama4.py +152 -0
  21. axolotl-0.14.0/src/axolotl/cli/evaluate.py +62 -0
  22. axolotl-0.14.0/src/axolotl/cli/inference.py +324 -0
  23. axolotl-0.14.0/src/axolotl/cli/main.py +351 -0
  24. axolotl-0.14.0/src/axolotl/cli/merge_lora.py +93 -0
  25. axolotl-0.14.0/src/axolotl/cli/merge_sharded_fsdp_weights.py +209 -0
  26. axolotl-0.14.0/src/axolotl/cli/preprocess.py +124 -0
  27. axolotl-0.14.0/src/axolotl/cli/quantize.py +128 -0
  28. axolotl-0.14.0/src/axolotl/cli/train.py +121 -0
  29. axolotl-0.14.0/src/axolotl/cli/utils/__init__.py +23 -0
  30. axolotl-0.14.0/src/axolotl/cli/utils/args.py +120 -0
  31. axolotl-0.14.0/src/axolotl/cli/utils/diffusion.py +374 -0
  32. axolotl-0.14.0/src/axolotl/cli/utils/fetch.py +142 -0
  33. axolotl-0.14.0/src/axolotl/cli/utils/load.py +52 -0
  34. axolotl-0.14.0/src/axolotl/cli/utils/sweeps.py +81 -0
  35. axolotl-0.14.0/src/axolotl/cli/utils/train.py +225 -0
  36. axolotl-0.14.0/src/axolotl/cli/vllm_serve.py +84 -0
  37. axolotl-0.14.0/src/axolotl/common/__init__.py +0 -0
  38. axolotl-0.14.0/src/axolotl/common/architectures.py +21 -0
  39. axolotl-0.14.0/src/axolotl/common/const.py +3 -0
  40. axolotl-0.14.0/src/axolotl/common/datasets.py +146 -0
  41. axolotl-0.14.0/src/axolotl/convert.py +75 -0
  42. axolotl-0.14.0/src/axolotl/core/__init__.py +0 -0
  43. axolotl-0.14.0/src/axolotl/core/attention/__init__.py +0 -0
  44. axolotl-0.14.0/src/axolotl/core/builders/__init__.py +6 -0
  45. axolotl-0.14.0/src/axolotl/core/builders/base.py +582 -0
  46. axolotl-0.14.0/src/axolotl/core/builders/causal.py +530 -0
  47. axolotl-0.14.0/src/axolotl/core/builders/rl.py +242 -0
  48. axolotl-0.14.0/src/axolotl/core/chat/__init__.py +0 -0
  49. axolotl-0.14.0/src/axolotl/core/chat/format/__init__.py +0 -0
  50. axolotl-0.14.0/src/axolotl/core/chat/format/chatml.py +35 -0
  51. axolotl-0.14.0/src/axolotl/core/chat/format/llama3x.py +46 -0
  52. axolotl-0.14.0/src/axolotl/core/chat/format/shared.py +48 -0
  53. axolotl-0.14.0/src/axolotl/core/chat/messages.py +230 -0
  54. axolotl-0.14.0/src/axolotl/core/datasets/__init__.py +0 -0
  55. axolotl-0.14.0/src/axolotl/core/datasets/chat.py +51 -0
  56. axolotl-0.14.0/src/axolotl/core/datasets/transforms/__init__.py +0 -0
  57. axolotl-0.14.0/src/axolotl/core/datasets/transforms/chat_builder.py +151 -0
  58. axolotl-0.14.0/src/axolotl/core/trainers/__init__.py +14 -0
  59. axolotl-0.14.0/src/axolotl/core/trainers/base.py +775 -0
  60. axolotl-0.14.0/src/axolotl/core/trainers/dpo/__init__.py +41 -0
  61. axolotl-0.14.0/src/axolotl/core/trainers/dpo/args.py +18 -0
  62. axolotl-0.14.0/src/axolotl/core/trainers/dpo/trainer.py +111 -0
  63. axolotl-0.14.0/src/axolotl/core/trainers/grpo/__init__.py +240 -0
  64. axolotl-0.14.0/src/axolotl/core/trainers/grpo/args.py +16 -0
  65. axolotl-0.14.0/src/axolotl/core/trainers/grpo/sampler.py +172 -0
  66. axolotl-0.14.0/src/axolotl/core/trainers/grpo/trainer.py +684 -0
  67. axolotl-0.14.0/src/axolotl/core/trainers/mamba.py +32 -0
  68. axolotl-0.14.0/src/axolotl/core/trainers/mixins/__init__.py +11 -0
  69. axolotl-0.14.0/src/axolotl/core/trainers/mixins/activation_checkpointing.py +217 -0
  70. axolotl-0.14.0/src/axolotl/core/trainers/mixins/checkpoints.py +23 -0
  71. axolotl-0.14.0/src/axolotl/core/trainers/mixins/distributed_parallel.py +32 -0
  72. axolotl-0.14.0/src/axolotl/core/trainers/mixins/optimizer.py +215 -0
  73. axolotl-0.14.0/src/axolotl/core/trainers/mixins/packing.py +20 -0
  74. axolotl-0.14.0/src/axolotl/core/trainers/mixins/rng_state_loader.py +68 -0
  75. axolotl-0.14.0/src/axolotl/core/trainers/mixins/scheduler.py +145 -0
  76. axolotl-0.14.0/src/axolotl/core/trainers/trl.py +86 -0
  77. axolotl-0.14.0/src/axolotl/core/trainers/utils.py +33 -0
  78. axolotl-0.14.0/src/axolotl/core/training_args.py +69 -0
  79. axolotl-0.14.0/src/axolotl/core/training_args_base.py +265 -0
  80. axolotl-0.14.0/src/axolotl/datasets.py +87 -0
  81. axolotl-0.14.0/src/axolotl/evaluate.py +151 -0
  82. axolotl-0.14.0/src/axolotl/integrations/__init__.py +0 -0
  83. axolotl-0.14.0/src/axolotl/integrations/base.py +653 -0
  84. axolotl-0.14.0/src/axolotl/integrations/config.py +93 -0
  85. axolotl-0.14.0/src/axolotl/integrations/cut_cross_entropy/__init__.py +146 -0
  86. axolotl-0.14.0/src/axolotl/integrations/cut_cross_entropy/args.py +54 -0
  87. axolotl-0.14.0/src/axolotl/integrations/densemixer/__init__.py +5 -0
  88. axolotl-0.14.0/src/axolotl/integrations/densemixer/args.py +11 -0
  89. axolotl-0.14.0/src/axolotl/integrations/densemixer/plugin.py +42 -0
  90. axolotl-0.14.0/src/axolotl/integrations/diffusion/__init__.py +19 -0
  91. axolotl-0.14.0/src/axolotl/integrations/diffusion/args.py +95 -0
  92. axolotl-0.14.0/src/axolotl/integrations/diffusion/callbacks.py +174 -0
  93. axolotl-0.14.0/src/axolotl/integrations/diffusion/generation.py +409 -0
  94. axolotl-0.14.0/src/axolotl/integrations/diffusion/plugin.py +41 -0
  95. axolotl-0.14.0/src/axolotl/integrations/diffusion/trainer.py +301 -0
  96. axolotl-0.14.0/src/axolotl/integrations/diffusion/utils.py +166 -0
  97. axolotl-0.14.0/src/axolotl/integrations/grokfast/__init__.py +49 -0
  98. axolotl-0.14.0/src/axolotl/integrations/grokfast/args.py +16 -0
  99. axolotl-0.14.0/src/axolotl/integrations/grokfast/optimizer.py +62 -0
  100. axolotl-0.14.0/src/axolotl/integrations/kd/__init__.py +108 -0
  101. axolotl-0.14.0/src/axolotl/integrations/kd/args.py +76 -0
  102. axolotl-0.14.0/src/axolotl/integrations/kd/callbacks.py +34 -0
  103. axolotl-0.14.0/src/axolotl/integrations/kd/chat_template.py +335 -0
  104. axolotl-0.14.0/src/axolotl/integrations/kd/collator.py +267 -0
  105. axolotl-0.14.0/src/axolotl/integrations/kd/collator_online_teacher.py +564 -0
  106. axolotl-0.14.0/src/axolotl/integrations/kd/kernels/__init__.py +8 -0
  107. axolotl-0.14.0/src/axolotl/integrations/kd/kernels/liger.py +485 -0
  108. axolotl-0.14.0/src/axolotl/integrations/kd/kernels/models.py +104 -0
  109. axolotl-0.14.0/src/axolotl/integrations/kd/topk_logprob/__init__.py +0 -0
  110. axolotl-0.14.0/src/axolotl/integrations/kd/topk_logprob/forward_kl.py +173 -0
  111. axolotl-0.14.0/src/axolotl/integrations/kd/trainer.py +103 -0
  112. axolotl-0.14.0/src/axolotl/integrations/kd/utils.py +100 -0
  113. axolotl-0.14.0/src/axolotl/integrations/kernels/__init__.py +7 -0
  114. axolotl-0.14.0/src/axolotl/integrations/kernels/args.py +35 -0
  115. axolotl-0.14.0/src/axolotl/integrations/kernels/plugin.py +61 -0
  116. axolotl-0.14.0/src/axolotl/integrations/liger/__init__.py +28 -0
  117. axolotl-0.14.0/src/axolotl/integrations/liger/args.py +104 -0
  118. axolotl-0.14.0/src/axolotl/integrations/liger/models/__init__.py +0 -0
  119. axolotl-0.14.0/src/axolotl/integrations/liger/models/base.py +188 -0
  120. axolotl-0.14.0/src/axolotl/integrations/liger/models/deepseekv2.py +122 -0
  121. axolotl-0.14.0/src/axolotl/integrations/liger/models/jamba.py +162 -0
  122. axolotl-0.14.0/src/axolotl/integrations/liger/models/llama4.py +178 -0
  123. axolotl-0.14.0/src/axolotl/integrations/liger/models/qwen3.py +158 -0
  124. axolotl-0.14.0/src/axolotl/integrations/liger/models/qwen3_moe.py +189 -0
  125. axolotl-0.14.0/src/axolotl/integrations/liger/plugin.py +209 -0
  126. axolotl-0.14.0/src/axolotl/integrations/liger/utils.py +29 -0
  127. axolotl-0.14.0/src/axolotl/integrations/llm_compressor/__init__.py +5 -0
  128. axolotl-0.14.0/src/axolotl/integrations/llm_compressor/args.py +40 -0
  129. axolotl-0.14.0/src/axolotl/integrations/llm_compressor/plugin.py +171 -0
  130. axolotl-0.14.0/src/axolotl/integrations/llm_compressor/utils.py +37 -0
  131. axolotl-0.14.0/src/axolotl/integrations/lm_eval/__init__.py +37 -0
  132. axolotl-0.14.0/src/axolotl/integrations/lm_eval/args.py +18 -0
  133. axolotl-0.14.0/src/axolotl/integrations/lm_eval/cli.py +119 -0
  134. axolotl-0.14.0/src/axolotl/integrations/spectrum/__init__.py +104 -0
  135. axolotl-0.14.0/src/axolotl/integrations/spectrum/args.py +47 -0
  136. axolotl-0.14.0/src/axolotl/integrations/swanlab/__init__.py +6 -0
  137. axolotl-0.14.0/src/axolotl/integrations/swanlab/args.py +140 -0
  138. axolotl-0.14.0/src/axolotl/integrations/swanlab/callbacks.py +179 -0
  139. axolotl-0.14.0/src/axolotl/integrations/swanlab/completion_logger.py +228 -0
  140. axolotl-0.14.0/src/axolotl/integrations/swanlab/plugins.py +554 -0
  141. axolotl-0.14.0/src/axolotl/integrations/swanlab/profiling.py +203 -0
  142. axolotl-0.14.0/src/axolotl/kernels/__init__.py +0 -0
  143. axolotl-0.14.0/src/axolotl/kernels/geglu.py +155 -0
  144. axolotl-0.14.0/src/axolotl/kernels/lora.py +837 -0
  145. axolotl-0.14.0/src/axolotl/kernels/quantize.py +148 -0
  146. axolotl-0.14.0/src/axolotl/kernels/swiglu.py +162 -0
  147. axolotl-0.14.0/src/axolotl/kernels/utils.py +11 -0
  148. axolotl-0.14.0/src/axolotl/loaders/__init__.py +9 -0
  149. axolotl-0.14.0/src/axolotl/loaders/adapter.py +223 -0
  150. axolotl-0.14.0/src/axolotl/loaders/adapters/__init__.py +0 -0
  151. axolotl-0.14.0/src/axolotl/loaders/constants.py +18 -0
  152. axolotl-0.14.0/src/axolotl/loaders/model.py +883 -0
  153. axolotl-0.14.0/src/axolotl/loaders/patch_manager.py +569 -0
  154. axolotl-0.14.0/src/axolotl/loaders/processor.py +82 -0
  155. axolotl-0.14.0/src/axolotl/loaders/tokenizer.py +310 -0
  156. axolotl-0.14.0/src/axolotl/loaders/utils.py +237 -0
  157. axolotl-0.14.0/src/axolotl/logging_config.py +156 -0
  158. axolotl-0.14.0/src/axolotl/models/__init__.py +0 -0
  159. axolotl-0.14.0/src/axolotl/models/mamba/__init__.py +24 -0
  160. axolotl-0.14.0/src/axolotl/models/mamba/configuration_mamba.py +43 -0
  161. axolotl-0.14.0/src/axolotl/models/mamba/modeling_mamba.py +126 -0
  162. axolotl-0.14.0/src/axolotl/monkeypatch/__init__.py +0 -0
  163. axolotl-0.14.0/src/axolotl/monkeypatch/accelerate/__init__.py +0 -0
  164. axolotl-0.14.0/src/axolotl/monkeypatch/accelerate/fsdp2.py +388 -0
  165. axolotl-0.14.0/src/axolotl/monkeypatch/accelerate/parallelism_config.py +107 -0
  166. axolotl-0.14.0/src/axolotl/monkeypatch/attention/__init__.py +19 -0
  167. axolotl-0.14.0/src/axolotl/monkeypatch/attention/flex_attn.py +85 -0
  168. axolotl-0.14.0/src/axolotl/monkeypatch/attention/xformers.py +160 -0
  169. axolotl-0.14.0/src/axolotl/monkeypatch/btlm_attn_hijack_flash.py +65 -0
  170. axolotl-0.14.0/src/axolotl/monkeypatch/data/__init__.py +0 -0
  171. axolotl-0.14.0/src/axolotl/monkeypatch/data/batch_dataset_fetcher.py +96 -0
  172. axolotl-0.14.0/src/axolotl/monkeypatch/deepspeed_utils.py +67 -0
  173. axolotl-0.14.0/src/axolotl/monkeypatch/fsdp2_qlora.py +143 -0
  174. axolotl-0.14.0/src/axolotl/monkeypatch/gradient_checkpointing/__init__.py +59 -0
  175. axolotl-0.14.0/src/axolotl/monkeypatch/gradient_checkpointing/offload_cpu.py +67 -0
  176. axolotl-0.14.0/src/axolotl/monkeypatch/gradient_checkpointing/offload_disk.py +532 -0
  177. axolotl-0.14.0/src/axolotl/monkeypatch/llama_attn_hijack_flash.py +269 -0
  178. axolotl-0.14.0/src/axolotl/monkeypatch/llama_attn_hijack_xformers.py +156 -0
  179. axolotl-0.14.0/src/axolotl/monkeypatch/llama_expand_mask.py +24 -0
  180. axolotl-0.14.0/src/axolotl/monkeypatch/llama_patch_multipack.py +26 -0
  181. axolotl-0.14.0/src/axolotl/monkeypatch/lora_kernels.py +463 -0
  182. axolotl-0.14.0/src/axolotl/monkeypatch/loss/__init__.py +0 -0
  183. axolotl-0.14.0/src/axolotl/monkeypatch/loss/chunked.py +134 -0
  184. axolotl-0.14.0/src/axolotl/monkeypatch/loss/eaft.py +51 -0
  185. axolotl-0.14.0/src/axolotl/monkeypatch/mistral_attn_hijack_flash.py +18 -0
  186. axolotl-0.14.0/src/axolotl/monkeypatch/mixtral/__init__.py +49 -0
  187. axolotl-0.14.0/src/axolotl/monkeypatch/models/__init__.py +0 -0
  188. axolotl-0.14.0/src/axolotl/monkeypatch/models/apertus/__init__.py +0 -0
  189. axolotl-0.14.0/src/axolotl/monkeypatch/models/apertus/activation.py +52 -0
  190. axolotl-0.14.0/src/axolotl/monkeypatch/models/kimi_linear/__init__.py +0 -0
  191. axolotl-0.14.0/src/axolotl/monkeypatch/models/kimi_linear/configuration_kimi.py +148 -0
  192. axolotl-0.14.0/src/axolotl/monkeypatch/models/kimi_linear/modeling_kimi.py +1361 -0
  193. axolotl-0.14.0/src/axolotl/monkeypatch/models/kimi_linear/patch_kimi_linear.py +85 -0
  194. axolotl-0.14.0/src/axolotl/monkeypatch/models/kimi_linear/tokenization_kimi.py +357 -0
  195. axolotl-0.14.0/src/axolotl/monkeypatch/models/llama4/__init__.py +0 -0
  196. axolotl-0.14.0/src/axolotl/monkeypatch/models/llama4/modeling.py +106 -0
  197. axolotl-0.14.0/src/axolotl/monkeypatch/models/mistral3/__init__.py +0 -0
  198. axolotl-0.14.0/src/axolotl/monkeypatch/models/mistral3/mistral_common_tokenizer.py +85 -0
  199. axolotl-0.14.0/src/axolotl/monkeypatch/models/pixtral/__init__.py +0 -0
  200. axolotl-0.14.0/src/axolotl/monkeypatch/models/pixtral/modeling_flash_attention_utils.py +42 -0
  201. axolotl-0.14.0/src/axolotl/monkeypatch/models/qwen3_next/__init__.py +1 -0
  202. axolotl-0.14.0/src/axolotl/monkeypatch/models/qwen3_next/modeling.py +317 -0
  203. axolotl-0.14.0/src/axolotl/monkeypatch/models/voxtral/__init__.py +0 -0
  204. axolotl-0.14.0/src/axolotl/monkeypatch/models/voxtral/modeling.py +67 -0
  205. axolotl-0.14.0/src/axolotl/monkeypatch/multipack.py +85 -0
  206. axolotl-0.14.0/src/axolotl/monkeypatch/peft/__init__.py +0 -0
  207. axolotl-0.14.0/src/axolotl/monkeypatch/peft/utils.py +80 -0
  208. axolotl-0.14.0/src/axolotl/monkeypatch/relora.py +436 -0
  209. axolotl-0.14.0/src/axolotl/monkeypatch/ring_attn/__init__.py +17 -0
  210. axolotl-0.14.0/src/axolotl/monkeypatch/ring_attn/adapters/__init__.py +0 -0
  211. axolotl-0.14.0/src/axolotl/monkeypatch/ring_attn/adapters/batch.py +196 -0
  212. axolotl-0.14.0/src/axolotl/monkeypatch/ring_attn/patch.py +227 -0
  213. axolotl-0.14.0/src/axolotl/monkeypatch/scaled_softmax_attn.py +141 -0
  214. axolotl-0.14.0/src/axolotl/monkeypatch/stablelm_attn_hijack_flash.py +406 -0
  215. axolotl-0.14.0/src/axolotl/monkeypatch/tiled_mlp/__init__.py +11 -0
  216. axolotl-0.14.0/src/axolotl/monkeypatch/tiled_mlp/base.py +256 -0
  217. axolotl-0.14.0/src/axolotl/monkeypatch/tiled_mlp/patch.py +93 -0
  218. axolotl-0.14.0/src/axolotl/monkeypatch/trainer/__init__.py +0 -0
  219. axolotl-0.14.0/src/axolotl/monkeypatch/trainer/lr.py +42 -0
  220. axolotl-0.14.0/src/axolotl/monkeypatch/trainer/trl.py +13 -0
  221. axolotl-0.14.0/src/axolotl/monkeypatch/trainer_accelerator_args.py +83 -0
  222. axolotl-0.14.0/src/axolotl/monkeypatch/trainer_fsdp_optim.py +73 -0
  223. axolotl-0.14.0/src/axolotl/monkeypatch/transformers/__init__.py +0 -0
  224. axolotl-0.14.0/src/axolotl/monkeypatch/transformers/trainer_context_parallel.py +72 -0
  225. axolotl-0.14.0/src/axolotl/monkeypatch/transformers/trainer_loss_calc.py +139 -0
  226. axolotl-0.14.0/src/axolotl/monkeypatch/transformers_fa_utils.py +68 -0
  227. axolotl-0.14.0/src/axolotl/monkeypatch/unsloth_.py +252 -0
  228. axolotl-0.14.0/src/axolotl/monkeypatch/utils.py +238 -0
  229. axolotl-0.14.0/src/axolotl/monkeypatch/xformers_/__init__.py +52 -0
  230. axolotl-0.14.0/src/axolotl/processing_strategies.py +546 -0
  231. axolotl-0.14.0/src/axolotl/prompt_strategies/__init__.py +53 -0
  232. axolotl-0.14.0/src/axolotl/prompt_strategies/alpaca_chat.py +120 -0
  233. axolotl-0.14.0/src/axolotl/prompt_strategies/alpaca_instruct.py +22 -0
  234. axolotl-0.14.0/src/axolotl/prompt_strategies/alpaca_w_system.py +162 -0
  235. axolotl-0.14.0/src/axolotl/prompt_strategies/base.py +34 -0
  236. axolotl-0.14.0/src/axolotl/prompt_strategies/bradley_terry/__init__.py +34 -0
  237. axolotl-0.14.0/src/axolotl/prompt_strategies/bradley_terry/chat_template.py +122 -0
  238. axolotl-0.14.0/src/axolotl/prompt_strategies/bradley_terry/llama3.py +27 -0
  239. axolotl-0.14.0/src/axolotl/prompt_strategies/chat_template.py +1039 -0
  240. axolotl-0.14.0/src/axolotl/prompt_strategies/completion.py +91 -0
  241. axolotl-0.14.0/src/axolotl/prompt_strategies/context_qa.py +108 -0
  242. axolotl-0.14.0/src/axolotl/prompt_strategies/creative_acr.py +197 -0
  243. axolotl-0.14.0/src/axolotl/prompt_strategies/dpo/__init__.py +9 -0
  244. axolotl-0.14.0/src/axolotl/prompt_strategies/dpo/chat_template.py +242 -0
  245. axolotl-0.14.0/src/axolotl/prompt_strategies/dpo/chatml.py +150 -0
  246. axolotl-0.14.0/src/axolotl/prompt_strategies/dpo/llama3.py +150 -0
  247. axolotl-0.14.0/src/axolotl/prompt_strategies/dpo/passthrough.py +10 -0
  248. axolotl-0.14.0/src/axolotl/prompt_strategies/dpo/user_defined.py +41 -0
  249. axolotl-0.14.0/src/axolotl/prompt_strategies/dpo/zephyr.py +18 -0
  250. axolotl-0.14.0/src/axolotl/prompt_strategies/input_output.py +54 -0
  251. axolotl-0.14.0/src/axolotl/prompt_strategies/jinja_template_analyzer.py +334 -0
  252. axolotl-0.14.0/src/axolotl/prompt_strategies/kto/__init__.py +9 -0
  253. axolotl-0.14.0/src/axolotl/prompt_strategies/kto/chatml.py +102 -0
  254. axolotl-0.14.0/src/axolotl/prompt_strategies/kto/llama3.py +102 -0
  255. axolotl-0.14.0/src/axolotl/prompt_strategies/kto/user_defined.py +38 -0
  256. axolotl-0.14.0/src/axolotl/prompt_strategies/llama2_chat.py +208 -0
  257. axolotl-0.14.0/src/axolotl/prompt_strategies/messages/__init__.py +34 -0
  258. axolotl-0.14.0/src/axolotl/prompt_strategies/messages/chat.py +91 -0
  259. axolotl-0.14.0/src/axolotl/prompt_strategies/metharme.py +74 -0
  260. axolotl-0.14.0/src/axolotl/prompt_strategies/orcamini.py +47 -0
  261. axolotl-0.14.0/src/axolotl/prompt_strategies/orpo/__init__.py +9 -0
  262. axolotl-0.14.0/src/axolotl/prompt_strategies/orpo/chat_template.py +283 -0
  263. axolotl-0.14.0/src/axolotl/prompt_strategies/pretrain.py +61 -0
  264. axolotl-0.14.0/src/axolotl/prompt_strategies/pygmalion.py +103 -0
  265. axolotl-0.14.0/src/axolotl/prompt_strategies/stepwise_supervised.py +116 -0
  266. axolotl-0.14.0/src/axolotl/prompt_strategies/user_defined.py +94 -0
  267. axolotl-0.14.0/src/axolotl/prompt_tokenizers.py +374 -0
  268. axolotl-0.14.0/src/axolotl/prompters.py +277 -0
  269. axolotl-0.14.0/src/axolotl/telemetry/__init__.py +0 -0
  270. axolotl-0.14.0/src/axolotl/telemetry/callbacks.py +165 -0
  271. axolotl-0.14.0/src/axolotl/telemetry/errors.py +160 -0
  272. axolotl-0.14.0/src/axolotl/telemetry/manager.py +416 -0
  273. axolotl-0.14.0/src/axolotl/telemetry/runtime_metrics.py +210 -0
  274. axolotl-0.14.0/src/axolotl/train.py +596 -0
  275. axolotl-0.14.0/src/axolotl/utils/__init__.py +75 -0
  276. axolotl-0.14.0/src/axolotl/utils/bench.py +130 -0
  277. axolotl-0.14.0/src/axolotl/utils/callbacks/__init__.py +913 -0
  278. axolotl-0.14.0/src/axolotl/utils/callbacks/comet_.py +43 -0
  279. axolotl-0.14.0/src/axolotl/utils/callbacks/dynamic_checkpoint.py +132 -0
  280. axolotl-0.14.0/src/axolotl/utils/callbacks/lisa.py +90 -0
  281. axolotl-0.14.0/src/axolotl/utils/callbacks/mlflow_.py +55 -0
  282. axolotl-0.14.0/src/axolotl/utils/callbacks/models.py +23 -0
  283. axolotl-0.14.0/src/axolotl/utils/callbacks/opentelemetry.py +238 -0
  284. axolotl-0.14.0/src/axolotl/utils/callbacks/perplexity.py +85 -0
  285. axolotl-0.14.0/src/axolotl/utils/callbacks/profiler.py +75 -0
  286. axolotl-0.14.0/src/axolotl/utils/callbacks/qat.py +48 -0
  287. axolotl-0.14.0/src/axolotl/utils/callbacks/swanlab.py +248 -0
  288. axolotl-0.14.0/src/axolotl/utils/callbacks/tokens_per_second.py +103 -0
  289. axolotl-0.14.0/src/axolotl/utils/callbacks/trackio_.py +44 -0
  290. axolotl-0.14.0/src/axolotl/utils/chat_templates/__init__.py +20 -0
  291. axolotl-0.14.0/src/axolotl/utils/chat_templates/base.py +125 -0
  292. axolotl-0.14.0/src/axolotl/utils/chat_templates/templates/alpaca.jinja +8 -0
  293. axolotl-0.14.0/src/axolotl/utils/chat_templates/templates/aya.jinja +1 -0
  294. axolotl-0.14.0/src/axolotl/utils/chat_templates/templates/chatml.jinja +4 -0
  295. axolotl-0.14.0/src/axolotl/utils/chat_templates/templates/cohere.jinja +1 -0
  296. axolotl-0.14.0/src/axolotl/utils/chat_templates/templates/command_a.jinja +210 -0
  297. axolotl-0.14.0/src/axolotl/utils/chat_templates/templates/command_a_rag.jinja +158 -0
  298. axolotl-0.14.0/src/axolotl/utils/chat_templates/templates/command_a_tool_use.jinja +157 -0
  299. axolotl-0.14.0/src/axolotl/utils/chat_templates/templates/deepseek_v2.jinja +3 -0
  300. axolotl-0.14.0/src/axolotl/utils/chat_templates/templates/deepseek_v3.jinja +1 -0
  301. axolotl-0.14.0/src/axolotl/utils/chat_templates/templates/exaone.jinja +4 -0
  302. axolotl-0.14.0/src/axolotl/utils/chat_templates/templates/exaone4.jinja +126 -0
  303. axolotl-0.14.0/src/axolotl/utils/chat_templates/templates/falcon_h1.jinja +17 -0
  304. axolotl-0.14.0/src/axolotl/utils/chat_templates/templates/gemma.jinja +4 -0
  305. axolotl-0.14.0/src/axolotl/utils/chat_templates/templates/gemma3.jinja +47 -0
  306. axolotl-0.14.0/src/axolotl/utils/chat_templates/templates/gemma3n.jinja +49 -0
  307. axolotl-0.14.0/src/axolotl/utils/chat_templates/templates/jamba.jinja +255 -0
  308. axolotl-0.14.0/src/axolotl/utils/chat_templates/templates/llama3.jinja +5 -0
  309. axolotl-0.14.0/src/axolotl/utils/chat_templates/templates/llama3_2_vision.jinja +122 -0
  310. axolotl-0.14.0/src/axolotl/utils/chat_templates/templates/llama4.jinja +123 -0
  311. axolotl-0.14.0/src/axolotl/utils/chat_templates/templates/llava.jinja +2 -0
  312. axolotl-0.14.0/src/axolotl/utils/chat_templates/templates/metharme.jinja +1 -0
  313. axolotl-0.14.0/src/axolotl/utils/chat_templates/templates/mistral_v1.jinja +1 -0
  314. axolotl-0.14.0/src/axolotl/utils/chat_templates/templates/mistral_v2v3.jinja +1 -0
  315. axolotl-0.14.0/src/axolotl/utils/chat_templates/templates/mistral_v3_tekken.jinja +1 -0
  316. axolotl-0.14.0/src/axolotl/utils/chat_templates/templates/mistral_v7_tekken.jinja +51 -0
  317. axolotl-0.14.0/src/axolotl/utils/chat_templates/templates/phi_3.jinja +7 -0
  318. axolotl-0.14.0/src/axolotl/utils/chat_templates/templates/phi_35.jinja +8 -0
  319. axolotl-0.14.0/src/axolotl/utils/chat_templates/templates/phi_4.jinja +1 -0
  320. axolotl-0.14.0/src/axolotl/utils/chat_templates/templates/pixtral.jinja +53 -0
  321. axolotl-0.14.0/src/axolotl/utils/chat_templates/templates/qwen2_vl.jinja +7 -0
  322. axolotl-0.14.0/src/axolotl/utils/chat_templates/templates/qwen3.jinja +93 -0
  323. axolotl-0.14.0/src/axolotl/utils/chat_templates/templates/qwen_25.jinja +54 -0
  324. axolotl-0.14.0/src/axolotl/utils/collators/__init__.py +17 -0
  325. axolotl-0.14.0/src/axolotl/utils/collators/batching.py +227 -0
  326. axolotl-0.14.0/src/axolotl/utils/collators/core.py +5 -0
  327. axolotl-0.14.0/src/axolotl/utils/collators/mamba.py +39 -0
  328. axolotl-0.14.0/src/axolotl/utils/collators/mm_chat.py +59 -0
  329. axolotl-0.14.0/src/axolotl/utils/comet_.py +93 -0
  330. axolotl-0.14.0/src/axolotl/utils/config/__init__.py +321 -0
  331. axolotl-0.14.0/src/axolotl/utils/config/models/__init__.py +0 -0
  332. axolotl-0.14.0/src/axolotl/utils/ctx_managers/__init__.py +5 -0
  333. axolotl-0.14.0/src/axolotl/utils/ctx_managers/sequence_parallel.py +387 -0
  334. axolotl-0.14.0/src/axolotl/utils/data/__init__.py +21 -0
  335. axolotl-0.14.0/src/axolotl/utils/data/lock.py +68 -0
  336. axolotl-0.14.0/src/axolotl/utils/data/rl.py +292 -0
  337. axolotl-0.14.0/src/axolotl/utils/data/sft.py +520 -0
  338. axolotl-0.14.0/src/axolotl/utils/data/shared.py +570 -0
  339. axolotl-0.14.0/src/axolotl/utils/data/streaming.py +304 -0
  340. axolotl-0.14.0/src/axolotl/utils/data/utils.py +272 -0
  341. axolotl-0.14.0/src/axolotl/utils/data/wrappers.py +424 -0
  342. axolotl-0.14.0/src/axolotl/utils/datasets.py +13 -0
  343. axolotl-0.14.0/src/axolotl/utils/dict.py +51 -0
  344. axolotl-0.14.0/src/axolotl/utils/distributed.py +370 -0
  345. axolotl-0.14.0/src/axolotl/utils/environment.py +56 -0
  346. axolotl-0.14.0/src/axolotl/utils/freeze.py +232 -0
  347. axolotl-0.14.0/src/axolotl/utils/import_helper.py +28 -0
  348. axolotl-0.14.0/src/axolotl/utils/logging.py +52 -0
  349. axolotl-0.14.0/src/axolotl/utils/lora.py +76 -0
  350. axolotl-0.14.0/src/axolotl/utils/mistral/__init__.py +6 -0
  351. axolotl-0.14.0/src/axolotl/utils/mistral/mistral3_processor.py +170 -0
  352. axolotl-0.14.0/src/axolotl/utils/mistral/mistral_tokenizer.py +238 -0
  353. axolotl-0.14.0/src/axolotl/utils/mlflow_.py +22 -0
  354. axolotl-0.14.0/src/axolotl/utils/model_shard_quant.py +276 -0
  355. axolotl-0.14.0/src/axolotl/utils/optimizers/__init__.py +0 -0
  356. axolotl-0.14.0/src/axolotl/utils/optimizers/adopt.py +543 -0
  357. axolotl-0.14.0/src/axolotl/utils/quantization.py +213 -0
  358. axolotl-0.14.0/src/axolotl/utils/samplers/__init__.py +6 -0
  359. axolotl-0.14.0/src/axolotl/utils/samplers/multipack.py +473 -0
  360. axolotl-0.14.0/src/axolotl/utils/samplers/utils.py +21 -0
  361. axolotl-0.14.0/src/axolotl/utils/schedulers.py +342 -0
  362. axolotl-0.14.0/src/axolotl/utils/schemas/__init__.py +0 -0
  363. axolotl-0.14.0/src/axolotl/utils/schemas/config.py +1428 -0
  364. axolotl-0.14.0/src/axolotl/utils/schemas/datasets.py +299 -0
  365. axolotl-0.14.0/src/axolotl/utils/schemas/deprecated.py +89 -0
  366. axolotl-0.14.0/src/axolotl/utils/schemas/dynamic_checkpoint.py +31 -0
  367. axolotl-0.14.0/src/axolotl/utils/schemas/enums.py +96 -0
  368. axolotl-0.14.0/src/axolotl/utils/schemas/fsdp.py +76 -0
  369. axolotl-0.14.0/src/axolotl/utils/schemas/integrations.py +222 -0
  370. axolotl-0.14.0/src/axolotl/utils/schemas/internal/__init__.py +21 -0
  371. axolotl-0.14.0/src/axolotl/utils/schemas/model.py +150 -0
  372. axolotl-0.14.0/src/axolotl/utils/schemas/multimodal.py +48 -0
  373. axolotl-0.14.0/src/axolotl/utils/schemas/peft.py +233 -0
  374. axolotl-0.14.0/src/axolotl/utils/schemas/quantization.py +82 -0
  375. axolotl-0.14.0/src/axolotl/utils/schemas/training.py +203 -0
  376. axolotl-0.14.0/src/axolotl/utils/schemas/trl.py +191 -0
  377. axolotl-0.14.0/src/axolotl/utils/schemas/utils.py +79 -0
  378. axolotl-0.14.0/src/axolotl/utils/schemas/validation.py +1493 -0
  379. axolotl-0.14.0/src/axolotl/utils/schemas/vllm.py +59 -0
  380. axolotl-0.14.0/src/axolotl/utils/tee.py +166 -0
  381. axolotl-0.14.0/src/axolotl/utils/tokenization.py +120 -0
  382. axolotl-0.14.0/src/axolotl/utils/trackio_.py +17 -0
  383. axolotl-0.14.0/src/axolotl/utils/train.py +47 -0
  384. axolotl-0.14.0/src/axolotl/utils/trainer.py +732 -0
  385. axolotl-0.14.0/src/axolotl/utils/wandb_.py +18 -0
  386. axolotl-0.14.0/src/axolotl.egg-info/PKG-INFO +295 -0
  387. axolotl-0.14.0/src/axolotl.egg-info/SOURCES.txt +414 -0
  388. axolotl-0.14.0/src/axolotl.egg-info/dependency_links.txt +1 -0
  389. axolotl-0.14.0/src/axolotl.egg-info/entry_points.txt +2 -0
  390. axolotl-0.14.0/src/axolotl.egg-info/requires.txt +107 -0
  391. axolotl-0.14.0/src/axolotl.egg-info/top_level.txt +2 -0
  392. axolotl-0.14.0/src/setuptools_axolotl_dynamic_dependencies.py +102 -0
  393. axolotl-0.14.0/tests/test_chunked_xentropy.py +40 -0
  394. axolotl-0.14.0/tests/test_data.py +105 -0
  395. axolotl-0.14.0/tests/test_datasets.py +489 -0
  396. axolotl-0.14.0/tests/test_dict.py +103 -0
  397. axolotl-0.14.0/tests/test_exact_deduplication.py +429 -0
  398. axolotl-0.14.0/tests/test_expand_mask.py +45 -0
  399. axolotl-0.14.0/tests/test_freeze.py +285 -0
  400. axolotl-0.14.0/tests/test_loaders.py +218 -0
  401. axolotl-0.14.0/tests/test_logging_config_file_capture.py +103 -0
  402. axolotl-0.14.0/tests/test_lora.py +69 -0
  403. axolotl-0.14.0/tests/test_normalize_config.py +196 -0
  404. axolotl-0.14.0/tests/test_opentelemetry_callback.py +349 -0
  405. axolotl-0.14.0/tests/test_packed_batch_sampler.py +120 -0
  406. axolotl-0.14.0/tests/test_packed_dataset.py +110 -0
  407. axolotl-0.14.0/tests/test_packed_pretraining.py +111 -0
  408. axolotl-0.14.0/tests/test_perplexity.py +47 -0
  409. axolotl-0.14.0/tests/test_prompt_tokenizers.py +243 -0
  410. axolotl-0.14.0/tests/test_prompters.py +137 -0
  411. axolotl-0.14.0/tests/test_schedulers.py +56 -0
  412. axolotl-0.14.0/tests/test_streaming.py +238 -0
  413. axolotl-0.14.0/tests/test_tokenizers.py +162 -0
  414. axolotl-0.14.0/tests/test_train.py +39 -0
  415. axolotl-0.14.0/tests/test_utils_tee.py +107 -0
  416. axolotl-0.14.0/tests/test_validation_dataset.py +367 -0
axolotl-0.14.0/LICENSE ADDED
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -0,0 +1,6 @@
1
+ include requirements.txt
2
+ include README.md
3
+ include LICENSE
4
+ include src/setuptools_axolotl_dynamic_dependencies.py
5
+ include src/axolotl/utils/chat_templates/templates/*.jinja
6
+ recursive-include axolotl *.py
@@ -0,0 +1,295 @@
1
+ Metadata-Version: 2.4
2
+ Name: axolotl
3
+ Version: 0.14.0
4
+ Summary: LLM Trainer
5
+ Project-URL: Homepage, https://axolotl.ai/
6
+ Project-URL: Documentation, https://docs.axolotl.ai/
7
+ Project-URL: Repository, https://github.com/axolotl-ai-cloud/axolotl.git
8
+ Requires-Python: >=3.10
9
+ Description-Content-Type: text/markdown
10
+ License-File: LICENSE
11
+ Requires-Dist: bitsandbytes==0.49.1
12
+ Requires-Dist: triton>=3.0.0
13
+ Requires-Dist: xformers>=0.0.23.post1
14
+ Requires-Dist: liger-kernel==0.6.4
15
+ Requires-Dist: packaging==26.0
16
+ Requires-Dist: huggingface_hub>=1.1.7
17
+ Requires-Dist: peft>=0.18.1
18
+ Requires-Dist: tokenizers>=0.22.1
19
+ Requires-Dist: transformers==5.0.0
20
+ Requires-Dist: accelerate==1.12.0
21
+ Requires-Dist: datasets==4.5.0
22
+ Requires-Dist: trl==0.27.1
23
+ Requires-Dist: hf_xet==1.2.0
24
+ Requires-Dist: kernels==0.11.5
25
+ Requires-Dist: trackio>=0.13.0
26
+ Requires-Dist: typing-extensions>=4.15.0
27
+ Requires-Dist: optimum==1.16.2
28
+ Requires-Dist: hf_transfer
29
+ Requires-Dist: sentencepiece
30
+ Requires-Dist: gradio<7.0,>=6.2.0
31
+ Requires-Dist: modal==1.3.0.post1
32
+ Requires-Dist: pydantic>=2.10.6
33
+ Requires-Dist: addict
34
+ Requires-Dist: fire
35
+ Requires-Dist: PyYAML>=6.0
36
+ Requires-Dist: requests
37
+ Requires-Dist: wandb
38
+ Requires-Dist: einops
39
+ Requires-Dist: colorama
40
+ Requires-Dist: numba>=0.61.2
41
+ Requires-Dist: numpy>=2.2.6
42
+ Requires-Dist: evaluate==0.4.1
43
+ Requires-Dist: scipy
44
+ Requires-Dist: nvidia-ml-py==12.560.30
45
+ Requires-Dist: art
46
+ Requires-Dist: tensorboard
47
+ Requires-Dist: python-dotenv==1.0.1
48
+ Requires-Dist: s3fs>=2024.5.0
49
+ Requires-Dist: gcsfs>=2025.3.0
50
+ Requires-Dist: adlfs>=2024.5.0
51
+ Requires-Dist: ocifs==1.3.2
52
+ Requires-Dist: zstandard==0.22.0
53
+ Requires-Dist: fastcore
54
+ Requires-Dist: lm_eval==0.4.7
55
+ Requires-Dist: langdetect==1.0.9
56
+ Requires-Dist: immutabledict==4.2.0
57
+ Requires-Dist: antlr4-python3-runtime==4.13.2
58
+ Requires-Dist: torchao==0.13.0
59
+ Requires-Dist: openenv-core==0.1.0
60
+ Requires-Dist: schedulefree==1.4.1
61
+ Requires-Dist: axolotl-contribs-lgpl==0.0.7
62
+ Requires-Dist: axolotl-contribs-mit==0.0.6
63
+ Requires-Dist: posthog==6.7.11
64
+ Requires-Dist: mistral-common==1.8.8
65
+ Requires-Dist: torch==2.8.0
66
+ Provides-Extra: flash-attn
67
+ Requires-Dist: flash-attn==2.8.3; extra == "flash-attn"
68
+ Provides-Extra: ring-flash-attn
69
+ Requires-Dist: flash-attn==2.8.3; extra == "ring-flash-attn"
70
+ Requires-Dist: ring-flash-attn>=0.1.7; extra == "ring-flash-attn"
71
+ Provides-Extra: deepspeed
72
+ Requires-Dist: deepspeed==0.18.2; extra == "deepspeed"
73
+ Requires-Dist: deepspeed-kernels; extra == "deepspeed"
74
+ Provides-Extra: mamba-ssm
75
+ Requires-Dist: mamba-ssm==1.2.0.post1; extra == "mamba-ssm"
76
+ Requires-Dist: causal_conv1d; extra == "mamba-ssm"
77
+ Provides-Extra: auto-gptq
78
+ Requires-Dist: auto-gptq==0.5.1; extra == "auto-gptq"
79
+ Provides-Extra: mlflow
80
+ Requires-Dist: mlflow; extra == "mlflow"
81
+ Provides-Extra: galore
82
+ Requires-Dist: galore_torch; extra == "galore"
83
+ Provides-Extra: apollo
84
+ Requires-Dist: apollo-torch; extra == "apollo"
85
+ Provides-Extra: optimizers
86
+ Requires-Dist: galore_torch; extra == "optimizers"
87
+ Requires-Dist: apollo-torch; extra == "optimizers"
88
+ Requires-Dist: lomo-optim==0.1.1; extra == "optimizers"
89
+ Requires-Dist: torch-optimi==0.2.1; extra == "optimizers"
90
+ Requires-Dist: came_pytorch==0.1.3; extra == "optimizers"
91
+ Provides-Extra: ray
92
+ Requires-Dist: ray[train]>=2.52.1; extra == "ray"
93
+ Provides-Extra: vllm
94
+ Requires-Dist: vllm==0.11.0; extra == "vllm"
95
+ Provides-Extra: llmcompressor
96
+ Requires-Dist: llmcompressor==0.5.1; extra == "llmcompressor"
97
+ Provides-Extra: opentelemetry
98
+ Requires-Dist: opentelemetry-api; extra == "opentelemetry"
99
+ Requires-Dist: opentelemetry-sdk; extra == "opentelemetry"
100
+ Requires-Dist: opentelemetry-exporter-prometheus; extra == "opentelemetry"
101
+ Requires-Dist: prometheus-client; extra == "opentelemetry"
102
+ Provides-Extra: fbgemm-gpu
103
+ Requires-Dist: fbgemm-gpu-genai==1.3.0; extra == "fbgemm-gpu"
104
+ Dynamic: license-file
105
+ Dynamic: provides-extra
106
+ Dynamic: requires-dist
107
+
108
+ <p align="center">
109
+ <picture>
110
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/axolotl-ai-cloud/axolotl/887513285d98132142bf5db2a74eb5e0928787f1/image/axolotl_logo_digital_white.svg">
111
+ <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/axolotl-ai-cloud/axolotl/887513285d98132142bf5db2a74eb5e0928787f1/image/axolotl_logo_digital_black.svg">
112
+ <img alt="Axolotl" src="https://raw.githubusercontent.com/axolotl-ai-cloud/axolotl/887513285d98132142bf5db2a74eb5e0928787f1/image/axolotl_logo_digital_black.svg" width="400" height="104" style="max-width: 100%;">
113
+ </picture>
114
+ </p>
115
+ <p align="center">
116
+ <strong>A Free and Open Source LLM Fine-tuning Framework</strong><br>
117
+ </p>
118
+
119
+ <p align="center">
120
+ <img src="https://img.shields.io/github/license/axolotl-ai-cloud/axolotl.svg?color=blue" alt="GitHub License">
121
+ <img src="https://github.com/axolotl-ai-cloud/axolotl/actions/workflows/tests.yml/badge.svg" alt="tests">
122
+ <a href="https://codecov.io/gh/axolotl-ai-cloud/axolotl"><img src="https://codecov.io/gh/axolotl-ai-cloud/axolotl/branch/main/graph/badge.svg" alt="codecov"></a>
123
+ <a href="https://github.com/axolotl-ai-cloud/axolotl/releases"><img src="https://img.shields.io/github/release/axolotl-ai-cloud/axolotl.svg" alt="Releases"></a>
124
+ <br/>
125
+ <a href="https://github.com/axolotl-ai-cloud/axolotl/graphs/contributors"><img src="https://img.shields.io/github/contributors-anon/axolotl-ai-cloud/axolotl?color=yellow&style=flat-square" alt="contributors" style="height: 20px;"></a>
126
+ <img src="https://img.shields.io/github/stars/axolotl-ai-cloud/axolotl" alt="GitHub Repo stars">
127
+ <br/>
128
+ <a href="https://discord.com/invite/HhrNrHJPRb"><img src="https://img.shields.io/badge/discord-7289da.svg?style=flat-square&logo=discord" alt="discord" style="height: 20px;"></a>
129
+ <a href="https://twitter.com/axolotl_ai"><img src="https://img.shields.io/twitter/follow/axolotl_ai?style=social" alt="twitter" style="height: 20px;"></a>
130
+ <a href="https://colab.research.google.com/github/axolotl-ai-cloud/axolotl/blob/main/examples/colab-notebooks/colab-axolotl-example.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="google-colab" style="height: 20px;"></a>
131
+ <br/>
132
+ <img src="https://github.com/axolotl-ai-cloud/axolotl/actions/workflows/tests-nightly.yml/badge.svg" alt="tests-nightly">
133
+ <img src="https://github.com/axolotl-ai-cloud/axolotl/actions/workflows/multi-gpu-e2e.yml/badge.svg" alt="multigpu-semi-weekly tests">
134
+ </p>
135
+
136
+
137
+ ## 🎉 Latest Updates
138
+
139
+ - 2025/12: Axolotl now includes support for [Kimi-Linear](https://docs.axolotl.ai/docs/models/kimi-linear.html), [Plano-Orchestrator](https://docs.axolotl.ai/docs/models/plano.html), [MiMo](https://docs.axolotl.ai/docs/models/mimo.html), [InternVL 3.5](https://docs.axolotl.ai/docs/models/internvl3_5.html), [Olmo3](https://docs.axolotl.ai/docs/models/olmo3.html), [Trinity](https://docs.axolotl.ai/docs/models/trinity.html), and [Ministral3](https://docs.axolotl.ai/docs/models/ministral3.html).
140
+ - 2025/10: New model support has been added in Axolotl for: [Qwen3 Next](https://docs.axolotl.ai/docs/models/qwen3-next.html), [Qwen2.5-vl, Qwen3-vl](https://github.com/axolotl-ai-cloud/axolotl/tree/main/examples/qwen2_5-vl), [Qwen3, Qwen3MoE](https://docs.axolotl.ai/docs/models/qwen3.html), [Granite 4](https://docs.axolotl.ai/docs/models/granite4.html), [HunYuan](https://docs.axolotl.ai/docs/models/hunyuan.html), [Magistral 2509](https://docs.axolotl.ai/docs/models/magistral/vision.html), [Apertus](https://docs.axolotl.ai/docs/models/apertus.html), and [Seed-OSS](https://docs.axolotl.ai/docs/models/seed-oss.html).
141
+ - 2025/09: Axolotl now has text diffusion training. Read more [here](https://github.com/axolotl-ai-cloud/axolotl/tree/main/src/axolotl/integrations/diffusion).
142
+ - 2025/08: QAT has been updated to include NVFP4 support. See [PR](https://github.com/axolotl-ai-cloud/axolotl/pull/3107).
143
+ - 2025/07:
144
+ - ND Parallelism support has been added into Axolotl. Compose Context Parallelism (CP), Tensor Parallelism (TP), and Fully Sharded Data Parallelism (FSDP) within a single node and across multiple nodes. Check out the [blog post](https://huggingface.co/blog/accelerate-nd-parallel) for more info.
145
+ - Axolotl adds more models: [GPT-OSS](https://docs.axolotl.ai/docs/models/gpt-oss.html), [Gemma 3n](https://docs.axolotl.ai/docs/models/gemma3n.html), [Liquid Foundation Model 2 (LFM2)](https://docs.axolotl.ai/docs/models/LiquidAI.html), and [Arcee Foundation Models (AFM)](https://docs.axolotl.ai/docs/models/arcee.html).
146
+ - FP8 finetuning with fp8 gather op is now possible in Axolotl via `torchao`. Get started [here](https://docs.axolotl.ai/docs/mixed_precision.html#sec-fp8)!
147
+ - [Voxtral](https://docs.axolotl.ai/docs/models/voxtral.html), [Magistral 1.1](https://docs.axolotl.ai/docs/models/magistral.html), and [Devstral](https://docs.axolotl.ai/docs/models/devstral.html) with mistral-common tokenizer support has been integrated in Axolotl!
148
+ - TiledMLP support for single-GPU to multi-GPU training with DDP, DeepSpeed and FSDP support has been added to support Arctic Long Sequence Training. (ALST). See [examples](https://github.com/axolotl-ai-cloud/axolotl/tree/main/examples/alst) for using ALST with Axolotl!
149
+ - 2025/05: Quantization Aware Training (QAT) support has been added to Axolotl. Explore the [docs](https://docs.axolotl.ai/docs/qat.html) to learn more!
150
+
151
+ <details>
152
+
153
+ <summary>Expand older updates</summary>
154
+
155
+ - 2025/03: Axolotl has implemented Sequence Parallelism (SP) support. Read the [blog](https://huggingface.co/blog/axolotl-ai-co/long-context-with-sequence-parallelism-in-axolotl) and [docs](https://docs.axolotl.ai/docs/sequence_parallelism.html) to learn how to scale your context length when fine-tuning.
156
+ - 2025/06: Magistral with mistral-common tokenizer support has been added to Axolotl. See [docs](https://docs.axolotl.ai/docs/models/magistral.html) to start training your own Magistral models with Axolotl!
157
+ - 2025/04: Llama 4 support has been added in Axolotl. See [docs](https://docs.axolotl.ai/docs/models/llama-4.html) to start training your own Llama 4 models with Axolotl's linearized version!
158
+ - 2025/03: (Beta) Fine-tuning Multimodal models is now supported in Axolotl. Check out the [docs](https://docs.axolotl.ai/docs/multimodal.html) to fine-tune your own!
159
+ - 2025/02: Axolotl has added LoRA optimizations to reduce memory usage and improve training speed for LoRA and QLoRA in single GPU and multi-GPU training (DDP and DeepSpeed). Jump into the [docs](https://docs.axolotl.ai/docs/lora_optims.html) to give it a try.
160
+ - 2025/02: Axolotl has added GRPO support. Dive into our [blog](https://huggingface.co/blog/axolotl-ai-co/training-llms-w-interpreter-feedback-wasm) and [GRPO example](https://github.com/axolotl-ai-cloud/grpo_code) and have some fun!
161
+ - 2025/01: Axolotl has added Reward Modelling / Process Reward Modelling fine-tuning support. See [docs](https://docs.axolotl.ai/docs/reward_modelling.html).
162
+
163
+ </details>
164
+
165
+ ## ✨ Overview
166
+
167
+ Axolotl is a free and open-source tool designed to streamline post-training and fine-tuning for the latest large language models (LLMs).
168
+
169
+ Features:
170
+
171
+ - **Multiple Model Support**: Train various models like GPT-OSS, LLaMA, Mistral, Mixtral, Pythia, and many more models available on the Hugging Face Hub.
172
+ - **Multimodal Training**: Fine-tune vision-language models (VLMs) including LLaMA-Vision, Qwen2-VL, Pixtral, LLaVA, SmolVLM2, and audio models like Voxtral with image, video, and audio support.
173
+ - **Training Methods**: Full fine-tuning, LoRA, QLoRA, GPTQ, QAT, Preference Tuning (DPO, IPO, KTO, ORPO), RL (GRPO), and Reward Modelling (RM) / Process Reward Modelling (PRM).
174
+ - **Easy Configuration**: Re-use a single YAML configuration file across the full fine-tuning pipeline: dataset preprocessing, training, evaluation, quantization, and inference.
175
+ - **Performance Optimizations**: [Multipacking](https://docs.axolotl.ai/docs/multipack.html), [Flash Attention](https://github.com/Dao-AILab/flash-attention), [Xformers](https://github.com/facebookresearch/xformers), [Flex Attention](https://pytorch.org/blog/flexattention/), [Liger Kernel](https://github.com/linkedin/Liger-Kernel), [Cut Cross Entropy](https://github.com/apple/ml-cross-entropy/tree/main), [Sequence Parallelism (SP)](https://docs.axolotl.ai/docs/sequence_parallelism.html), [LoRA optimizations](https://docs.axolotl.ai/docs/lora_optims.html), [Multi-GPU training (FSDP1, FSDP2, DeepSpeed)](https://docs.axolotl.ai/docs/multi-gpu.html), [Multi-node training (Torchrun, Ray)](https://docs.axolotl.ai/docs/multi-node.html), and many more!
176
+ - **Flexible Dataset Handling**: Load from local, HuggingFace, and cloud (S3, Azure, GCP, OCI) datasets.
177
+ - **Cloud Ready**: We ship [Docker images](https://hub.docker.com/u/axolotlai) and also [PyPI packages](https://pypi.org/project/axolotl/) for use on cloud platforms and local hardware.
178
+
179
+
180
+
181
+ ## 🚀 Quick Start - LLM Fine-tuning in Minutes
182
+
183
+ **Requirements**:
184
+
185
+ - NVIDIA GPU (Ampere or newer for `bf16` and Flash Attention) or AMD GPU
186
+ - Python 3.11
187
+ - PyTorch ≥2.8.0
188
+
189
+ ### Google Colab
190
+
191
+ [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/axolotl-ai-cloud/axolotl/blob/main/examples/colab-notebooks/colab-axolotl-example.ipynb#scrollTo=msOCO4NRmRLa)
192
+
193
+ ### Installation
194
+
195
+ #### Using pip
196
+
197
+ ```bash
198
+ pip3 install -U packaging==26.0 setuptools==75.8.0 wheel ninja
199
+ pip3 install --no-build-isolation axolotl[flash-attn,deepspeed]
200
+
201
+ # Download example axolotl configs, deepspeed configs
202
+ axolotl fetch examples
203
+ axolotl fetch deepspeed_configs # OPTIONAL
204
+ ```
205
+
206
+ #### Using Docker
207
+
208
+ Installing with Docker can be less error prone than installing in your own environment.
209
+ ```bash
210
+ docker run --gpus '"all"' --rm -it axolotlai/axolotl:main-latest
211
+ ```
212
+
213
+ Other installation approaches are described [here](https://docs.axolotl.ai/docs/installation.html).
214
+
215
+ #### Cloud Providers
216
+
217
+ <details>
218
+
219
+ - [RunPod](https://runpod.io/gsc?template=v2ickqhz9s&ref=6i7fkpdz)
220
+ - [Vast.ai](https://cloud.vast.ai?ref_id=62897&template_id=bdd4a49fa8bce926defc99471864cace&utm_source=github&utm_medium=developer_community&utm_campaign=template_launch_axolotl&utm_content=readme)
221
+ - [PRIME Intellect](https://app.primeintellect.ai/dashboard/create-cluster?image=axolotl&location=Cheapest&security=Cheapest&show_spot=true)
222
+ - [Modal](https://www.modal.com?utm_source=github&utm_medium=github&utm_campaign=axolotl)
223
+ - [Novita](https://novita.ai/gpus-console?templateId=311)
224
+ - [JarvisLabs.ai](https://jarvislabs.ai/templates/axolotl)
225
+ - [Latitude.sh](https://latitude.sh/blueprint/989e0e79-3bf6-41ea-a46b-1f246e309d5c)
226
+
227
+ </details>
228
+
229
+ ### Your First Fine-tune
230
+
231
+ ```bash
232
+ # Fetch axolotl examples
233
+ axolotl fetch examples
234
+
235
+ # Or, specify a custom path
236
+ axolotl fetch examples --dest path/to/folder
237
+
238
+ # Train a model using LoRA
239
+ axolotl train examples/llama-3/lora-1b.yml
240
+ ```
241
+
242
+ That's it! Check out our [Getting Started Guide](https://docs.axolotl.ai/docs/getting-started.html) for a more detailed walkthrough.
243
+
244
+
245
+ ## 📚 Documentation
246
+
247
+ - [Installation Options](https://docs.axolotl.ai/docs/installation.html) - Detailed setup instructions for different environments
248
+ - [Configuration Guide](https://docs.axolotl.ai/docs/config-reference.html) - Full configuration options and examples
249
+ - [Dataset Loading](https://docs.axolotl.ai/docs/dataset_loading.html) - Loading datasets from various sources
250
+ - [Dataset Guide](https://docs.axolotl.ai/docs/dataset-formats/) - Supported formats and how to use them
251
+ - [Multi-GPU Training](https://docs.axolotl.ai/docs/multi-gpu.html)
252
+ - [Multi-Node Training](https://docs.axolotl.ai/docs/multi-node.html)
253
+ - [Multipacking](https://docs.axolotl.ai/docs/multipack.html)
254
+ - [API Reference](https://docs.axolotl.ai/docs/api/) - Auto-generated code documentation
255
+ - [FAQ](https://docs.axolotl.ai/docs/faq.html) - Frequently asked questions
256
+
257
+ ## 🤝 Getting Help
258
+
259
+ - Join our [Discord community](https://discord.gg/HhrNrHJPRb) for support
260
+ - Check out our [Examples](https://github.com/axolotl-ai-cloud/axolotl/tree/main/examples/) directory
261
+ - Read our [Debugging Guide](https://docs.axolotl.ai/docs/debugging.html)
262
+ - Need dedicated support? Please contact [✉️wing@axolotl.ai](mailto:wing@axolotl.ai) for options
263
+
264
+ ## 🌟 Contributing
265
+
266
+ Contributions are welcome! Please see our [Contributing Guide](https://github.com/axolotl-ai-cloud/axolotl/blob/main/.github/CONTRIBUTING.md) for details.
267
+
268
+ ## 📈 Telemetry
269
+
270
+ Axolotl has opt-out telemetry that helps us understand how the project is being used
271
+ and prioritize improvements. We collect basic system information, model types, and
272
+ error rates—never personal data or file paths. Telemetry is enabled by default. To
273
+ disable it, set AXOLOTL_DO_NOT_TRACK=1. For more details, see our [telemetry documentation](https://docs.axolotl.ai/docs/telemetry.html).
274
+
275
+ ## ❤️ Sponsors
276
+
277
+ Interested in sponsoring? Contact us at [wing@axolotl.ai](mailto:wing@axolotl.ai)
278
+
279
+ ## 📝 Citing Axolotl
280
+
281
+ If you use Axolotl in your research or projects, please cite it as follows:
282
+
283
+ ```bibtex
284
+ @software{axolotl,
285
+ title = {Axolotl: Open Source LLM Post-Training},
286
+ author = {{Axolotl maintainers and contributors}},
287
+ url = {https://github.com/axolotl-ai-cloud/axolotl},
288
+ license = {Apache-2.0},
289
+ year = {2023}
290
+ }
291
+ ```
292
+
293
+ ## 📜 License
294
+
295
+ This project is licensed under the Apache 2.0 License - see the [LICENSE](LICENSE) file for details.