


git clone https://github.com/daanelson/alpaca-lora
cd alpaca-lora
unconverted-weights
├── 7B
│ ├── checklist.chk
│ ├── consolidated.00.pth
│ └── params.json
├── tokenizer.model
└── tokenizer_checklist.chk
cog run python -m transformers.models.llama.convert_llama_weights_to_hf
--input_dir unconverted-weights
--model_size 7B
--output_dir weights
weights
├── llama-7b
└── tokenizermdki
sudo curl -o /usr/local/bin/cog -L "https://github.com/replicate/cog/releases/latest/download/cog_$(uname -s)_$(uname -m)"
sudo chmod +x /usr/local/bin/cog
cog run python finetune.py
$ cog predict -i prompt="Tell me something about alpacas."
Alpacas are domesticated animals from South America. They are closely related to llamas and guanacos and have a long, dense, woolly fleece that is used to make textiles. They are herd animals and live in small groups in the Andes mountains. They have a wide variety of sounds, including whistles, snorts, and barks. They are intelligent and social animals and can be trained to perform certain tasks.
带上你自己的数据集,微调你自己的 LoRA,比如微调 LLaMA,让它像动漫角色一样说话。参见:https://replicate.com/blog/fine-tune-llama-to-speak-like-homer-simpson 将模型部署到云平台上; 结合其他 LoRA,比如 Stable Diffusion LoRA,把这些都用到图像领域; 使用 Alpaca 数据集(或其他数据集)微调更大的 LLaMA 模型,并查看它们的表现。这应该可以通过 PEFT 和 LoRA 实现,尽管它需要更大的 GPU。











本文网址: