this post was submitted on 23 Nov 2023
1 points (100.0% liked)

Machine Learning

1 readers
1 users here now

Community Rules:

founded 11 months ago
MODERATORS
 

Like many of you, I often need to train LLMs (Large Language Models). Code hops from one project to another, and it's easy to lose track, resulting in several iterations of the same training process.

X—LLM is a solution. It’s a streamlined, user-friendly library designed for efficient model training, offering advanced techniques and customizable options within the Hugging Face ecosystem.

Features:
- LoRA, QLoRA and fusing
- Flash Attention 2
- Gradient checkpointing
- bitsandbytes quantization
- GPTQ (including post-training quantization)
- W&B experiment tracking
- Simple training on multiple GPUs at once using DeepSpeed or FSDP

Use cases:
- Create production-ready solutions or fast prototypes. X—LLM works in both configurations
- Finetune a 7B model with 334 million tokens (1.1 million dialogues) for just 50$
- Automatically save each checkpoint during training to the Hugging Face Hub and don't lose any progress
- Quantize a model using GPTQ. Reduce 7B Mistral model from 15 GB to 4.3 GB and increase inference speed

Github repo: https://github.com/BobaZooba/xllm

You can train 7B model, fuse LoRA and upload ready-to-use model to the Hugging Face Hub. All in a single Colab! Link

The library has gained 100 stars in less than a day, and now it's almost at 200. People are using it, training models in both Colab and multi-GPU setups. Meanwhile, I'm supporting X—LLM users and currently implementing the most requested feature - DPO.

Code example

I suggest that you try training your own models and see for yourself how simple it is.

If you like it, please consider giving the project a star on GitHub.

you are viewing a single comment's thread
view the rest of the comments
[–] LyPreto@alien.top 1 points 10 months ago (2 children)

I rly wish MPS was more widely adopted by now… hate seeing just CUDA or CPU in all these new libraries

[–] Infamous-Bank-7739@alien.top 1 points 10 months ago (1 children)

You think people should prefer Mac over more general hw?

[–] LyPreto@alien.top 1 points 10 months ago (1 children)

not prefer it bur recognize its user base— metal + the unified memory have a lot to offer and the compute is there.. there just rly no adoption other than a few select projects like llama.cpp and some of the other text-inferencing engines.

[–] Infamous-Bank-7739@alien.top 1 points 10 months ago

Well it's going to be one before the other on small projects always. Do you have any good experience on the apple hw then? I can see the benefits of faster memory, but it needs to prove its worth for people to give it any actual attention.