目录

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/

文档

访问 PyTorch 的全面开发人员文档

查看文档

教程

获取面向初学者和高级开发人员的深入教程

查看教程

资源

查找开发资源并解答您的问题

查看资源