Giter VIP home page Giter VIP logo

Comments (4)

rakovskij-stanislav avatar rakovskij-stanislav commented on May 30, 2024 1

I can say that alpaca_lora_4bit is nice. It has no cyrillic issues (xturing has), and I had no problems to run it.

The hardware: RTX A4000
The dataset is same for both cases.

Differences between rulm (using rualpaca 7b) and alpaca_lora_4bit (using GPTQ v2 alpaca 7b):

  • The speed of fine-tuning: 26.3 hours vs 7.1, 10 batches vs 50 batches (trying to use the nearly whole 16gb vram)
  • Eval/loss: 1.214 vs 1.064
  • Inference: 15.2gb vs 5.7gb, the speed is 3-5 tokens vs 13 tokens
  • Quality of speech: rualpaca is definitely better for russian speech. alpaca_lora_4bit often tries to use other languages or generates a code:
image

For now, quantized model is more prefferable for me because I can get results faster - both inference and fine-tuning. Probably full training without lora will be also affordable on such small model.

It would be great if rulm will start to support alpaca_lora_4bit - 7b inference and fine_tuning can be fitted in 8gb vram, it's awesome result.

from rulm.

IlyaGusev avatar IlyaGusev commented on May 30, 2024

Hi! I'm not sure how you are supposed to train models in 4-bits. AFAIK only 8-bit training is commonly supported by now, although I haven't seen many full 8-bit fine tunes.

Usually, the easiest option is to train adapters, for instance, LoRA. In that case, you can quantize a model into 8 bits with mixed RTN quantization. It is natively supported in the transformers package. After that, you freeze the original weights and train only new weights.

from rulm.

rakovskij-stanislav avatar rakovskij-stanislav commented on May 30, 2024

Hi! This project does support 4bit training - https://github.com/johnsmith0031/alpaca_lora_4bit

For now (started yesterday) I'm trying to combine rulm and alpaca_lora_4bit and check the outcome. As far as I can see, the fine-tune process will last less time. Unfortunately, alpaca_lora_4bit has no wandb integration. I'll write updates in this issue.

Also bitsandbytes announced 4bit support - https://www.reddit.com/r/LocalLLaMA/comments/13ahz60/bitsandbytes_4bit_finetuning_30b65b_llama_models/
Probably it's the easier way to get quantized models fine-tuning.

from rulm.

IlyaGusev avatar IlyaGusev commented on May 30, 2024

Thank you for sharing your results!

I'll definitely try to use code from alpaca_lora_4bit, though it seems to be highly experimental.

from rulm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.