torchtune
PyTorch native post-training library
File Explorer
Download Latest Version (.zip)- pre_build_script.sh
- build_docs.yaml
- build_linux_wheels.yaml
- export.yaml
- gpu_test.yaml
- lint.yaml
- regression_test.yaml
- rl_test.yaml
- unit_test.yaml
- PULL_REQUEST_TEMPLATE.md
- custom_torchtune.css
- card-background.svg
- comet_torchtune_project.png
- generic-pytorch-logo.png
- kd-finetune-student.png
- kd-finetune-teacher.png
- kd-hyperparam-kd-ratio.png
- kd-hyperparam-lr.png
- kd-qwen2-res.png
- kd-simplified.png
- lora_diagram.png
- lora_experiment_loss_curves.png
- pytorch-logo-dark.png
- pytorch-logo-dark.svg
- pytorch-logo-flame.png
- pytorch-logo-flame.svg
- qat_diagram.png
- qlora_exp.png
- torchtune_datasets.svg
- torchtune_workspace.png
- class.rst
- function.rst
- layout.html
- chat_datasets.rst
- custom_components.rst
- custom_datasets.rst
- datasets_overview.rst
- instruct_datasets.rst
- message_transforms.rst
- messages.rst
- model_transforms.rst
- multimodal_datasets.rst
- packing.rst
- preference_datasets.rst
- prompt_templates.rst
- text_completion_datasets.rst
- tokenizers.rst
- checkpointer.rst
- comet_logging.rst
- configs.rst
- README.txt
- recipe_deepdive.rst
- wandb_logging.rst
- dpo.rst
- lora_finetune_single_device.rst
- qat_distributed.rst
- recipes_overview.rst
- chat.rst
- e2e_flow.rst
- first_finetune_tutorial.rst
- llama3.rst
- llama_kd_tutorial.rst
- lora_finetune.rst
- memory_optimizations.rst
- multinode.rst
- qat_finetune.rst
- qlora_finetune.rst
- README.txt
- api_ref_config.rst
- api_ref_data.rst
- api_ref_datasets.rst
- api_ref_generation.rst
- api_ref_models.rst
- api_ref_modules.rst
- api_ref_rlhf.rst
- api_ref_training.rst
- api_ref_utilities.rst
- conf.py
- custom_directives.py
- index.rst
- install.rst
- overview.rst
- tune_cli.rst
- license_header.txt
- Makefile
- requirements.txt
- 11B_lora_multi_dataset.yaml
- 3B_full_grpo.yaml
- 3B_sft_for_grpo.yaml
- 8B_full_experimental.yaml
- qwen3B_async_grpo.yaml
- qwen3B_sync_grpo.yaml
- 2B_full.yaml
- 2B_lora.yaml
- 2B_lora_single_device.yaml
- 2B_qlora_single_device.yaml
- 7B_full.yaml
- 7B_lora.yaml
- 7B_lora_single_device.yaml
- 7B_qlora_single_device.yaml
- evaluation.yaml
- 27B_full.yaml
- 27B_lora.yaml
- 27B_lora_single_device.yaml
- 27B_qlora_single_device.yaml
- 2B_full.yaml
- 2B_lora.yaml
- 2B_lora_single_device.yaml
- 2B_qlora_single_device.yaml
- 9B_full.yaml
- 9B_lora.yaml
- 9B_lora_single_device.yaml
- 9B_qlora_single_device.yaml
- 13B_full.yaml
- 13B_lora.yaml
- 13B_qlora_single_device.yaml
- 1B_full_ppo_low_memory_single_device.yaml
- 1B_qat_single_device.yaml
- 70B_lora.yaml
- 70B_qlora.yaml
- 7B_full.yaml
- 7B_full_low_memory.yaml
- 7B_lora.yaml
- 7B_lora_dpo.yaml
- 7B_lora_dpo_single_device.yaml
- 7B_lora_single_device.yaml
- 7B_qat_full.yaml
- 7B_qlora.yaml
- 7B_qlora_single_device.yaml
- generation_v2.yaml
- 70B_full.yaml
- 70B_generation_distributed.yaml
- 70B_lora.yaml
- 8B_dora.yaml
- 8B_dora_single_device.yaml
- 8B_full.yaml
- 8B_full_single_device.yaml
- 8B_lora.yaml
- 8B_lora_single_device.yaml
- 8B_qat_full.yaml
- 8B_qat_lora.yaml
- 8B_qdora_single_device.yaml
- 8B_qlora_single_device.yaml
- 405B_qlora.yaml
- 70B_full.yaml
- 70B_generation_distributed.yaml
- 70B_lora.yaml
- 8B_full.yaml
- 8B_full_dpo.yaml
- 8B_full_single_device.yaml
- 8B_lora.yaml
- 8B_lora_dpo.yaml
- 8B_lora_dpo_single_device.yaml
- 8B_lora_single_device.yaml
- 8B_qat_full.yaml
- 8B_qat_lora.yaml
- 8B_qlora_single_device.yaml
- evaluation.yaml
- 1B_full.yaml
- 1B_full_single_device.yaml
- 1B_lora.yaml
- 1B_lora_single_device.yaml
- 1B_qat_lora.yaml
- 1B_qlora_single_device.yaml
- 3B_full.yaml
- 3B_full_single_device.yaml
- 3B_lora.yaml
- 3B_lora_single_device.yaml
- 3B_qat_full.yaml
- 3B_qat_lora.yaml
- 3B_qlora_single_device.yaml
- 8B_to_1B_KD_lora_distributed.yaml
- 8B_to_1B_KD_lora_single_device.yaml
- evaluation.yaml
- 11B_evaluation.yaml
- 11B_full.yaml
- 11B_full_single_device.yaml
- 11B_generation_v2.yaml
- 11B_lora.yaml
- 11B_lora_single_device.yaml
- 11B_qlora.yaml
- 11B_qlora_single_device.yaml
- 90B_full.yaml
- 90B_lora.yaml
- 90B_qlora.yaml
- 70B_full.yaml
- 70B_full_multinode.yaml
- 70B_generation_distributed.yaml
- 70B_lora.yaml
- 70B_qlora.yaml
- maverick_17B_128E_full.yaml
- scout_17B_16E_full.yaml
- scout_17B_16E_generation_distributed.yaml
- scout_17B_16E_lora.yaml
- 7B_full.yaml
- 7B_full_low_memory.yaml
- 7B_full_ppo_low_memory.yaml
- 7B_lora.yaml
- 7B_lora_single_device.yaml
- 7B_qlora_single_device.yaml
- evaluation.yaml
- evaluation.yaml
- mini_full.yaml
- mini_full_low_memory.yaml
- mini_lora.yaml
- mini_lora_single_device.yaml
- mini_qlora_single_device.yaml
- 14B_full.yaml
- 14B_full_low_memory.yaml
- 14B_lora.yaml
- 14B_lora_single_device.yaml
- 14B_qlora_single_device.yaml
- evaluation.yaml
- 0.5B_full.yaml
- 0.5B_full_single_device.yaml
- 0.5B_lora.yaml
- 0.5B_lora_single_device.yaml
- 1.5_to_0.5B_KD_lora_distributed.yaml
- 1.5_to_0.5B_KD_lora_single_device.yaml
- 1.5B_full.yaml
- 1.5B_full_single_device.yaml
- 1.5B_lora.yaml
- 1.5B_lora_single_device.yaml
- 7B_full.yaml
- 7B_full_single_device.yaml
- 7B_lora.yaml
- 7B_lora_single_device.yaml
- evaluation.yaml
- 0.5B_full.yaml
- 0.5B_full_single_device.yaml
- 0.5B_lora.yaml
- 0.5B_lora_single_device.yaml
- 1.5B_full.yaml
- 1.5B_full_single_device.yaml
- 1.5B_lora.yaml
- 1.5B_lora_single_device.yaml
- 1.5B_qat_single_device.yaml
- 14B_lora_single_device.yaml
- 14B_to_7B_KD_lora_single_device.yaml
- 32B_lora.yaml
- 3B_full.yaml
- 3B_full_single_device.yaml
- 3B_lora.yaml
- 3B_lora_single_device.yaml
- 3B_qat_single_device.yaml
- 72B_lora.yaml
- 7B_full.yaml
- 7B_full_single_device.yaml
- 7B_lora.yaml
- 7B_lora_single_device.yaml
- evaluation.yaml
- 0.6B_full.yaml
- 0.6B_full_single_device.yaml
- 0.6B_lora.yaml
- 0.6B_lora_single_device.yaml
- 0.6B_qat_full.yaml
- 0.6B_qat_lora.yaml
- 1.7B_full.yaml
- 1.7B_full_single_device.yaml
- 1.7B_lora.yaml
- 1.7B_lora_single_device.yaml
- 1.7B_qat_full.yaml
- 1.7B_qat_lora.yaml
- 14B_lora_single_device.yaml
- 14B_to_8B_KD_lora_single_device.yaml
- 32B_lora.yaml
- 32B_qat_lora.yaml
- 4B_full.yaml
- 4B_full_single_device.yaml
- 4B_lora.yaml
- 4B_lora_single_device.yaml
- 4B_qat_full.yaml
- 4B_qat_lora.yaml
- 8B_full.yaml
- 8B_full_single_device.yaml
- 8B_lora.yaml
- 8B_lora_single_device.yaml
- 8B_qat_full.yaml
- 8B_qat_lora.yaml
- evaluation.yaml
- eleuther_evaluation.yaml
- generation.yaml
- quantization.yaml
- 7B_full_early_exit.yaml
- async_grpo.md
- async_grpo_full_finetune_distributed.py
- early_exit_finetune_distributed.py
- generate_v2.py
- generate_v2_distributed.py
- grpo_full_finetune_distributed.py
- gsm8k_sft.sbatch
- lora_finetune_distributed_multi_dataset.py
- multinode_grpo.sbatch
- __init__.py
- eleuther_eval.py
- full_dpo_distributed.py
- full_finetune_distributed.py
- full_finetune_multinode.slurm
- full_finetune_single_device.py
- generate.py
- knowledge_distillation_distributed.py
- knowledge_distillation_single_device.py
- lora_dpo_distributed.py
- lora_dpo_single_device.py
- lora_finetune_distributed.py
- lora_finetune_single_device.py
- ppo_full_finetune_single_device.py
- qat_distributed.py
- qat_lora_finetune_distributed.py
- qat_single_device.py
- quantization.md
- quantize.py
- alpaca_tiny.json
- chat_tiny.json
- dog_on_skateboard.jpg
- generation_config.json
- generation_config_gemma.json
- hh_rlhf_tiny.json
- instruct_tiny.json
- invalid_dummy_config.yaml
- m.model
- merges.txt
- README.md
- rgb_pytorch.png
- sentencepiece.model
- stack_exchange_paired_tiny.json
- tiktoken_small.model
- tiktoken_small_llama4.model
- tiny_bpe_merges.txt
- tiny_bpe_tokenizer.json
- tiny_bpe_vocab.json
- tiny_fair_checkpoint.pt
- tiny_state_dict_with_one_key.pt
- tokenizer.json
- tokenizer_config.json
- tokenizer_config_gemma.json
- tokenizer_gemma_cropped.json
- valid_dummy_config.yaml
- vocab.json
- vqa_tiny.json
- test_async_grpo_full_finetune_distributed.py
- test_generate_v2.py
- __init__.py
- common.py
- test_configs.py
- test_eleuther_eval.py
- test_full_dpo_distributed.py
- test_full_finetune_distributed.py
- test_full_finetune_single_device.py
- test_knowledge_distillation_distributed.py
- test_knowledge_distillation_single_device.py
- test_lora_dpo_distributed.py
- test_lora_dpo_single_device.py
- test_lora_finetune_distributed.py
- test_lora_finetune_single_device.py
- test_ppo_full_finetune_single_device.py
- test_qat_distributed.py
- test_qat_lora_finetune_distributed.py
- test_qat_single_device.py
- utils.py
- test_llama2_7b.py
- __init__.py
- test_cat.py
- test_cp.py
- test_download.py
- test_ls.py
- test_run.py
- test_tune.py
- test_validate.py
- test_config_utils.py
- test_instantiate.py
- test_parse.py
- test_validate.py
- test_collate.py
- test_data_utils.py
- test_messages.py
- test_prompt_templates.py
- test_llava_instruct_dataset.py
- test_multimodal_chat_dataset.py
- test_the_cauldron_dataset.py
- test_vqa_dataset.py
- __init__.py
- test_alpaca_dataset.py
- test_chat_dataset.py
- test_cnn_dailymail_dataset.py
- test_concat_dataset.py
- test_grammar_dataset.py
- test_hh_rlhf_helpful_dataset.py
- test_instruct_dataset.py
- test_packed_dataset.py
- test_preference_dataset.py
- test_samsum_dataset.py
- test_sft_dataset.py
- test_slimorca_dataset.py
- test_stack_exchange_paired_dataset.py
- test_text_completion_dataset.py
- test_wikitext_dataset.py
- __init__.py
- test_rewards.py
- test_postprocessing.py
- __init__.py
- test_generation.py
- __init__.py
- test_clip_image_transform.py
- test_clip_text_encoder.py
- test_clip_tokenizer.py
- test_pos_embedding_interpolation.py
- test_positional_embeddings.py
- test_flamingo_decoder.py
- test_flamingo_encoder.py
- __init__.py
- test_flux_autoencoder.py
- test_gemma_tokenizer.py
- __init__.py
- compare_attention.py
- compare_decoder.py
- compare_decoder_layer.py
- compare_dora.py
- compare_feed_forward.py
- compare_fused_attention.py
- compare_lora.py
- compare_lora_attention.py
- compare_lora_llama2.py
- README.md
- test_llama2_prompt_template.py
- test_llama2_tokenizer.py
- test_lora_llama2.py
- test_llama3.py
- test_llama3_tokenizer.py
- test_position_embeddings.py
- test_llama_vision_lora.py
- test_llama4.py
- test_llama4_tokenizer.py
- test_llama4_transform.py
- __init__.py
- compare_feed_forward.py
- compare_mistral.py
- compare_mistral_classifier.py
- mistral_reference.py
- mistral_test_config.py
- README.md
- test_mistral.py
- test_mistral_classifier.py
- test_mistral_prompt_template.py
- test_mistral_tokenizer.py
- __init__.py
- test_lora_phi3.py
- test_phi3.py
- test_phi3_position_embeddings.py
- test_phi3_tokenizer.py
- __init__.py
- test_phi4_tokenizer.py
- __init__.py
- test_lora_qwen2.py
- test_qwen2.py
- test_qwen2_tokenizer.py
- __init__.py
- test_tokenizer.py
- __init__.py
- test_tokenizer.py
- __init__.py
- test_t5_encoder.py
- test_t5_tokenizer.py
- __init__.py
- test_attention.py
- test_export_position_embeddings.py
- test_ce_chunked_output_loss.py
- test_cross_entropy_loss.py
- test_kd_losses.py
- __init__.py
- test_nf4_dispatch_registration.py
- test_nf4_linear.py
- __init__.py
- test_deep_fusion.py
- test_early_fusion.py
- test_fusion_layers.py
- test_fusion_utils.py
- test_experts.py
- test_moe.py
- __init__.py
- test_dora.py
- test_lora.py
- test_utils.py
- test_gpt2.py
- test_hf_tokenizer.py
- test_sentencepiece.py
- test_tiktoken.py
- test_utils.py
- test_get_canvas_best_fit.py
- test_get_inscribed_size.py
- test_pad_dim_to_size.py
- test_resize_with_pad.py
- test_tile_crop.py
- test_transforms.py
- __init__.py
- test_attention.py
- test_attention_utils.py
- test_classifier.py
- test_common_utils.py
- test_cosine_with_warmup.py
- test_early_exit_loss.py
- test_embedding_utils.py
- test_feed_forward.py
- test_kv_cache.py
- test_layer_dropout.py
- test_layernorm.py
- test_optim.py
- test_position_embeddings.py
- test_rms_norm.py
- test_transformer_decoder.py
- test_vision_transformer.py
- test_vq_embeddings.py
- test_parameter_server.py
- __init__.py
- test_dpo_loss.py
- test_ppo_loss.py
- __init__.py
- test_rewards.py
- test_sequence_processing.py
- test_checkpointer.py
- test_checkpointer_utils.py
- test_distributed_checkpointer.py
- test_activation_offloading.py
- test_distributed.py
- test_memory.py
- test_metric_logging.py
- test_model_util.py
- test_pooling.py
- test_precision.py
- test_profiler.py
- test_quantization.py
- test_seed.py
- __init__.py
- test_device.py
- test_logging.py
- __init__.py
- __init__.py
- cache_artifacts.sh
- common.py
- conftest.py
- test_import_recipes.py
- test_utils.py
- __init__.py
- cat.py
- cp.py
- download.py
- ls.py
- run.py
- subcommand.py
- tune.py
- validate.py
- __init__.py
- _errors.py
- _instantiate.py
- _parse.py
- _utils.py
- _validate.py
- __init__.py
- _collate.py
- _common.py
- _messages.py
- _prompt_templates.py
- _torchdata.py
- _utils.py
- __init__.py
- _llava_instruct.py
- _multimodal.py
- _the_cauldron.py
- _vqa.py
- __init__.py
- _alpaca.py
- _chat.py
- _cnn_dailymail.py
- _concat.py
- _grammar.py
- _hh_rlhf_helpful.py
- _instruct.py
- _packed.py
- _preference.py
- _samsum.py
- _sft.py
- _slimorca.py
- _stack_exchange_paired.py
- _text_completion.py
- _wikitext.py
- __init__.py
- data.py
- generation.py
- gsm8k.py
- loss.py
- rewards.py
- types.py
- __init__.py
- request_output.py
- trajectory.py
- vllm_completion_output.py
- __init__.py
- dist.py
- __init__.py
- sync.py
- __init__.py
- vllm.py
- __init__.py
- training.py
- __init__.py
- weight_updater.py
- __init__.py
- metric_logger.py
- postprocessing.py
- __init__.py
- data.py
- generation.py
- gsm8k.py
- linear_grpo_loss.py
- rewards.py
- types.py
- __init__.py
- README.md
- __init__.py
- _generation.py
- _transform.py
- __init__.py
- _component_builders.py
- _convert_weights.py
- _model_builders.py
- _position_embeddings.py
- _text_encoder.py
- _tokenizer.py
- _transform.py
- __init__.py
- _autoencoder.py
- _convert_weights.py
- _model_builders.py
- __init__.py
- _component_builders.py
- _model_builders.py
- _tokenizer.py
- gemma_norm_embedding.py
- rms_norm.py
- __init__.py
- _attention.py
- _component_builders.py
- _convert_weights.py
- _model_builders.py
- __init__.py
- _component_builders.py
- _model_builders.py
- _model_utils.py
- _prompt_template.py
- _tokenizer.py
- __init__.py
- _component_builders.py
- _model_builders.py
- _model_utils.py
- _parallelism.py
- _tokenizer.py
- __init__.py
- _component_builders.py
- _model_builders.py
- _position_embeddings.py
- __init__.py
- _component_builders.py
- _model_builders.py
- __init__.py
- _component_builders.py
- _convert_weights.py
- _encoder.py
- _model_builders.py
- _transform.py
- __init__.py
- _model_builders.py
- __init__.py
- _chunked_attention.py
- _component_builders.py
- _convert_weights.py
- _encoder.py
- _model_builders.py
- _parallelism.py
- _position_embeddings.py
- _tokenizer.py
- _transform.py
- __init__.py
- _component_builders.py
- _model_builders.py
- _prompt_template.py
- _tokenizer.py
- __init__.py
- _component_builders.py
- _convert_weights.py
- _model_builders.py
- _position_embeddings.py
- _tokenizer.py
- __init__.py
- _model_builders.py
- _tokenizer.py
- __init__.py
- _component_builders.py
- _convert_weights.py
- _model_builders.py
- _positional_embeddings.py
- _tokenizer.py
- __init__.py
- _model_builders.py
- _tokenizer.py
- __init__.py
- _attention.py
- _component_builders.py
- _convert_weights.py
- _model_builders.py
- _tokenizer.py
- __init__.py
- _component_builders.py
- _model_builders.py
- __init__.py
- _component_builders.py
- _convert_weights.py
- _encoder.py
- _model_builders.py
- _tokenizer.py
- __init__.py
- convert_weights.py
- _position_embeddings.py
- attention.py
- install_requirements.sh
- kv_cache.py
- README.md
- __init__.py
- ce_chunked_output_loss.py
- cross_entropy_loss.py
- kd_losses.py
- loss_types.py
- __init__.py
- _register_nf4_dispatch_ops.py
- nf4_linear.py
- __init__.py
- _deep_fusion.py
- _early_fusion.py
- _fusion_layers.py
- _fusion_utils.py
- __init__.py
- _parallelism.py
- experts.py
- indices.py
- moe.py
- utils.py
- __init__.py
- _utils.py
- dora.py
- lora.py
- __init__.py
- __init__.py
- _gpt2.py
- _hf_tokenizer.py
- _sentencepiece.py
- _tiktoken.py
- _utils.py
- __init__.py
- get_canvas_best_fit.py
- get_inscribed_size.py
- pad_dim_to_size.py
- resize_with_pad.py
- tile_crop.py
- __init__.py
- _transforms.py
- __init__.py
- attention.py
- attention_utils.py
- classifier.py
- common_utils.py
- early_exit_loss.py
- embedding_utils.py
- feed_forward.py
- kv_cache.py
- layer_dropout.py
- layer_norm.py
- optim.py
- position_embeddings.py
- rms_norm.py
- tanh_gate.py
- tied_linear.py
- transformer.py
- vision_transformer.py
- vq_embeddings.py
- __init__.py
- dpo.py
- ppo.py
- __init__.py
- _convert_weights.py
- __init__.py
- _types.py
- rewards.py
- sequence_processing.py
- __init__.py
- _checkpoint_client.py
- _checkpointer.py
- _utils.py
- __init__.py
- _activation_offloading.py
- _compile.py
- _distributed.py
- _grad_scaler.py
- _model_util.py
- _profiler.py
- activations.py
- lr_schedulers.py
- memory.py
- metric_logging.py
- pooling.py
- precision.py
- quantization.py
- seed.py
- __init__.py
- _device.py
- _import_guard.py
- _logging.py
- _version.py
- __init__.py
- _recipe_registry.py
- recipe_interfaces.py
- .flake8
- .gitignore
- .pre-commit-config.yaml
- CITATION.cff
- CODE_OF_CONDUCT.md
- CONTRIBUTING.md
- LICENSE
- MANIFEST.in
- pyproject.toml
- README.md
- version.txt
// repository documentation
Was this content helpful?
(0 ratings)
