Shortcuts

torchtune.models

llama3

All models from the Llama3 family.

tune download meta-llama/Meta-Llama-3-8B --hf-token <ACCESS_TOKEN>

llama3.llama3_8b

Builder for creating a Llama3 model initialized w/ the default 8b parameter values.

llama3.lora_llama3_8b

Builder for creating a Llama3 8B model with LoRA enabled.

llama3.qlora_llama3_8b

Builder for creating a Llama3 model with QLoRA enabled.

llama2

All models from the Llama2 family.

Pre-trained models can be downloaded from the Hugging Face Hub with the following command:

tune download meta-llama/Llama-2-7b-hf --hf-token <ACCESS_TOKEN>

llama2.llama2_7b

Builder for creating a Llama2 model initialized w/ the default 7b parameter values from https://arxiv.org/abs/2307.09288

llama2.lora_llama2_7b

Builder for creating a Llama2 7B model with LoRA enabled.

llama2.qlora_llama2_7b

Builder for creating a Llama2 model with QLoRA enabled.

llama2.llama2_13b

Builder for creating a Llama2 model initialized w/ the default 13b parameter values from https://arxiv.org/abs/2307.09288

llama2.lora_llama2_13b

Builder for creating a Llama2 13B model with LoRA enabled.

llama2.qlora_llama2_13b

Builder for creating a Llama2 13B model with LoRA enabled.

llama2.llama2_70b

Builder for creating a Llama2 model initialized w/ the default 70 parameter values from https://arxiv.org/abs/2307.09288

llama2.lora_llama2_70b

Builder for creating a Llama2 70B model with LoRA enabled.

mistral

All models from Mistral AI family.

Pre-trained models can be downloaded from the Hugging Face Hub with the following command:

tune download mistralai/Mistral-7B-v0.1

mistral.mistral_7b

Builder for creating a Mistral 7B model initialized w/ the default 7b parameter values from https://mistral.ai/news/announcing-mistral-7b/

mistral.lora_mistral_7b

Builder for creating a Mistral 7B model with LoRA enabled.

mistral.qlora_mistral_7b

Builder for creating a Mistral model with QLoRA enabled.

gemma

All models from the Gemma family.

Pre-trained models can be downloaded from the Hugging Face Hub with the following command:

tune download google/gemma-2b --hf-token <ACCESS_TOKEN> --ignore-patterns ""

gemma.gemma_2b

Builder for creating a Gemma 2B model initialized w/ the default 2b parameter values from: https://blog.google/technology/developers/gemma-open-models/

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources