👁️视觉微调
了解如何使用 Unsloth 微调视觉/多模态 LLM
禁用视觉 / 仅文本微调
model = FastVisionModel.get_peft_model(
model,
finetune_vision_layers = True, # 如果不微调视觉层则设为 False
finetune_language_layers = True, # 如果不微调语言层则设为 False
finetune_attention_modules = True, # 如果不微调 attention 层则设为 False
finetune_mlp_modules = True, # 如果不微调 MLP 层则设为 False
r = 16, # 越大准确率越高,但可能过拟合
lora_alpha = 16, # 推荐 alpha 至少等于 r
lora_dropout = 0,
bias = "none",
random_state = 3407,
use_rslora = False, # 我们支持 rank stabilized LoRA
loftq_config = None, # 以及 LoftQ
target_modules = "all-linear", # 现在是可选的!如有需要可以指定一个列表
modules_to_save=[
"lm_head",
"embed_tokens",
],
)视觉数据整理器
多图像训练
用于视觉微调的数据集
图像
说明文字

🔎仅对视觉模型、VLM 训练助手响应
最后更新于
这有帮助吗?

