Skip to main content

Fine-tuning, evaluation and data generation for LLMs

Project description

Stochastic.ai Stochastic.ai

Efficient, fast, and simple fine-tuning of LLM models


xturing is a python package to perform efficient fine-tuning of LLM models like LLaMA, GPT-J, GPT-2 and more. It supports both single GPU and multi-GPU training. Leverage efficient fine-tuning techniques like LoRA to reduce your hardware costs by up to 90% and train your models in a fraction of the time.


⚙️ Installation

pip install xturing

🚀 Quickstart

from xturing import BaseModel, InstructionDataset

# Load the dataset
instruction_dataset = InstructionDataset("./alpaca_data")

# Initialize the model
model = BaseModel.create("llama_lora")

# Finetune the model
model.finetune(dataset=instruction_dataset)

# Perform inference
output = model.generate(texts=["Why LLM models are becoming so important?"])

print("Generated output by the model: {}".format(output))

You can find the data folder here.


✅ Requirements

  • Source version of transformers library
    pip uninstall transformers && pip install git+https://github.com/huggingface/transformers.git
    
  • Source version of peft library
    pip uninstall peft && pip install git+https://github.com/huggingface/peft.git
    

📚 Tutorials


📈 Roadmap

  • Support for LLaMA, GPT-J, GPT-2
  • Support for Stable Diffusion
  • Dataset generation using self-instruction
  • Evaluation of LLM models

🤝 Help and Support

If you have any questions, you can create an issue on this repository.

You can also join our Discord server and start a discussion in the #xturing channel.


📝 License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.


🌎 Contributing

As an open source project in a rapidly evolving field, we welcome contributions of all kinds, including new features and better documentation. Please read our contributing guide to learn how you can get involved.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xturing-0.0.1.tar.gz (21.0 kB view hashes)

Uploaded Source

Built Distribution

xturing-0.0.1-py3-none-any.whl (26.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page