Skip to main content

Forge intelligent models from raw data.

Project description

CrineForge

Forge intelligent text-trained models from raw documents with enterprise-grade reliability.


🚀 What is CrineForge?

CrineForge is a lightweight, offline-first LLM fine-tuning toolkit designed to take you from raw documents to a fine-tuned LoRA model in minutes. It automatically structures raw text data using a powerful local structurer and fine-tunes HuggingFace models seamlessly.

It is designed to be safe, modular, and GPU-aware, providing exceptional performance out of the box.


🎯 Who is it for?

  • ML Engineers & AI Developers needing rapid, reliable fine-tuning pipelines.
  • Local Sandbox Users testing models securely on private data.
  • Enterprise Operations wanting structured training without heavy, complex configuration frameworks.

✨ Key Features

  • Blazing Fast Structuring: Powered by Qwen/Qwen2.5-1.5B-Instruct out-of-the-box for minimal VRAM footprint and high-speed JSON generation.
  • Pro Mode Structuring: Optional DeepSeek 7B fallback for rigorous, enterprise-scale formatting.
  • LoRA Fine-Tuning Support: Native integration with trl and peft.
  • Automatic 4-bit Fallback: Zero-configuration fallback quantization for low VRAM GPUs.
  • Gated Model Support: First-class support for HF_TOKEN authenticated models (e.g., Llama-3).
  • VRAM Logging: Detailed tracking of Allocated & Reserved memory metrics.

⚙️ System Requirements & Limitations

VRAM Requirements (Estimated)

GPU VRAM Mode Availability
8 GB 4-bit LoRA (Default fallback)
16 GB FP16/BF16 LoRA
24+ GB Pro Mode Structurer (DeepSeek 7B) + FP16 Training

Note: VRAM usage varies depending on context length and batch size.

Limitations

  • The default max_seq_length is conservatively set to 512 to prevent OOM errors on standard hardware.
  • Structurer models require an initial download which may take time depending on your network.

⚡ Quickstart

pip install crineforge
import os
from crineforge import Trainer

# Optional: Enable authenticated access to gated models
# os.environ["HF_TOKEN"] = "your_huggingface_token"

trainer = Trainer()
trainer.connect_model("sshleifer/tiny-gpt2")
trainer.load_data("data.txt")
trainer.auto_config()
trainer.train()
trainer.save("output_model")

🧠 Pro Mode (Heavyweight Structurer)

For power users with abundant VRAM, you can enable the DeepSeek 7B structurer:

trainer = Trainer(structurer_model="deepseek-ai/deepseek-llm-7b-chat")

📊 Performance & Optimization

  • Efficient Structurer: The default lightweight structurer (Qwen 1.5B) is utilized for performance, avoiding the heavy VRAM constraints of larger models.
  • Lazy-Loaded: The structurer is exclusively deployed at generation time.
  • VRAM Clearance: The structurer unloads natively before fine-tuning begins to prevent VRAM spikes.
  • Checkpointing: Explicit gradient_checkpointing automatically supported.

🔥 Important Disclaimer

Note:
CrineForge does not redistribute model weights.
Models are downloaded from their official sources and are subject to their respective licenses.

📄 License

Crineforge is licensed under the MIT License. Copyright (c) 2025 Abhishek.

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

crineforge-0.2.3.tar.gz (16.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

crineforge-0.2.3-py3-none-any.whl (21.6 kB view details)

Uploaded Python 3

File details

Details for the file crineforge-0.2.3.tar.gz.

File metadata

  • Download URL: crineforge-0.2.3.tar.gz
  • Upload date:
  • Size: 16.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for crineforge-0.2.3.tar.gz
Algorithm Hash digest
SHA256 89226b207e32dc8329ce1211d9042c68dbc1e6a9c2abdf3e74e5ba0ca7ffd939
MD5 3970bc106213383a02d05384af6f57c8
BLAKE2b-256 a734cd63f406f30af6d34ed8898c654ec61a05f2b8935bcf87ca08c15f013f5c

See more details on using hashes here.

File details

Details for the file crineforge-0.2.3-py3-none-any.whl.

File metadata

  • Download URL: crineforge-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 21.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for crineforge-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 1265592f76f4f6eec1ea92c195867864ddaac46486cd867e8bbd6d1ccfcf5e40
MD5 55ce6cafd38f2c3233503132b47fcf63
BLAKE2b-256 2e3d7f0d7b6e97ca371d9698c8d575cd449c13c3cabd919463854a105299cfd1

See more details on using hashes here.

Supported by

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