يمكن العثور على نسخة محدثة في ريبو جديد
https://github.com/gmongaras/wizard_qlora_finetuning
مثال عاملة لنموذج 4Bit Qlora Falcon/Llama2
لبدء Finetuning ، تحرير وتشغيل main.py
بمجرد اكتمال التذمر ، يجب أن يكون لديك نقاط تفتيش في ./outputs . قبل تشغيل الاستدلال ، يمكننا الجمع بين أوزان Lora والأوزان الأصلية للاستدلال الأسرع ومتطلبات GPU الأصغر أثناء الاستدلال. للقيام بذلك ، قم بتشغيل البرنامج النصي merge_weights.py مع مساراتك.
أخيرًا ، يمكنك تشغيل generate.py على سبيل المثال الجيل بالنظر إلى النموذج المدمج.
توجد متطلبات Python لتشغيل البرنامج النصي في المتطلبات. txt
./llama-2 عليك أيضًا تنزيل أوزان Falcon https://huggingface.co/meta-llama/Llama-2-7b-hf 7B هنا https://huggingface.co/tiiuae/falcon-7b ووضع الملفات في دليل ./tiiuae/falcon-7b
لا يدعم هذا البرنامج النصي GPUs متعدد على فنيه 4 بت. إذا وجدت طريقة للقيام بذلك ، فسوف أقوم بتحديث البرنامج النصي.
python -m pip uninstall bitsandbytes transformers accelerate peft -y
python -m pip install git+https://github.com/huggingface/transformers.git git+https://github.com/huggingface/peft.git git+https://github.com/huggingface/accelerate.git git+https://github.com/timdettmers/bitsandbytes.git -U
CUDA Setup failed despite GPU being available. Please run the following command to get more information ، ثم تحتاج إلى إنشاء bitsandbytes من المصدر ووضعه في أجزاءك وبيتلك بوجود باتباع https://github.com/oobabooga/text-generation-webui/issues/147