Hugging Face library for Parameter-Efficient Fine-Tuning (PEFT), adapting large pretrained models by training only a small set of extra parameters.
stochasticai/xTuring
A Python library for fine-tuning, evaluating and running open-source LLMs such as LLaMA, GPT-J and GPT-OSS on your own data, locally or in a private cloud.
- Stars
- 2,677
- Forks
- 209
- Open issues
- 10
- Last commit
- yesterday
What is it?
xTuring is a Python library for fine-tuning open-source large language models on your own data. It covers data preparation, training and inference through a single high-level API, so developers can adapt models without writing their own training loops.
It supports a range of model families, including GPT-OSS, LLaMA and LLaMA 2, Qwen3, Mistral, MiniMax M2, GPT-J, GPT-2, DistilGPT-2 and Mamba. Fine-tuning can use LoRA or low-precision INT8 and INT4 loading to reduce memory and compute requirements. Models can be evaluated with perplexity, and a Gradio-based UI and a CLI are provided for chatting with fine-tuned models.
The library is designed to run locally or inside a private VPC, so training data does not need to leave the user's infrastructure.
Key features
- 01Unified API for data preparation, fine-tuning and generation
- 02LoRA, INT8 and INT4 variants to reduce memory and compute cost
- 03Perplexity-based evaluation for causal language models
- 04Dataset generation from self-instruct and commercial model APIs
- 05CLI chat command and Gradio UI playground for fine-tuned models
Use cases
- Adapting an open-source LLM to a company's private documents without sending data to third parties
- Fine-tuning a small model like Qwen3 0.6B on a laptop for quick experiments
- Comparing fine-tuning approaches such as LoRA versus INT8 on the same dataset
- Generating instruction datasets from a local model for further training
Quick start
- 1
Install xTuring from PyPI
pip install xturing - 2
Run the small CPU-friendly fine-tuning example with the Qwen3 0.6B LoRA model
Things to know
- Fine-tuning larger models such as GPT-OSS requires significant GPU resources.
- xTuring requires transformers>=4.36.0 and must not be upgraded to transformers 5.x yet.
Topics
FAQ
- What is xTuring?
- A Python library for fine-tuning, evaluating and running open-source LLMs such as LLaMA, GPT-J and GPT-OSS on your own data, locally or in a private cloud. xTuring is a Python library for fine-tuning open-source large language models on your own data. It covers data preparation, training and inference through a single high-level API, so developers can adapt models without writing their own training loops.
- Is xTuring free to use? What license does it have?
- xTuring is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
- Is xTuring still maintained?
- Actively maintained. The last commit to xTuring was on Nov 5, 2026.
- What can I use xTuring for?
- Adapting an open-source LLM to a company's private documents without sending data to third parties Fine-tuning a small model like Qwen3 0.6B on a laptop for quick experiments Comparing fine-tuning approaches such as LoRA versus INT8 on the same dataset Generating instruction datasets from a local model for further training
- How do I install xTuring?
- Install xTuring from PyPI: pip install xturing Run the small CPU-friendly fine-tuning example with the Qwen3 0.6B LoRA model
- Where can I get xTuring?
- The source code and installation instructions are on GitHub: https://github.com/stochasticai/xTuring
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
A PyTorch-based toolkit of from-scratch LLM implementations for pretraining, finetuning, evaluating and serving 20+ open-weight models.
Unified framework for efficiently fine-tuning 100+ LLMs and VLMs with a zero-code CLI and Web UI.
A fine-tuning, training, inference and deployment framework for 600+ large language models and 400+ multimodal models, covering SFT, DPO and GRPO.
A Python library implementing parameter-efficient fine-tuning methods (LoRA, LoHa, LoKr, (IA)^3, DyLoRA) for Stable Diffusion models.
Python library that runs large language models layer by layer so 70B-class models can infer on a single 4GB GPU, without quantization.