CarvusTrain: A powerful AI development ecosystem — train, deploy, and serve AI models with code generation, grammar understanding, RAG, and agent training.
Project description
CarvusTrain
An AI Development Ecosystem — Train, Deploy, and Serve AI Models
CarvusTrain is a complete AI development ecosystem that goes beyond simple training. It features real code generation in 14+ programming languages, semantic knowledge bases with TF-IDF search, built-in English grammar understanding, REST API deployment, and goal-oriented agent training — all in pure Python with zero mandatory dependencies.
Quick Start
pip install -e .
python
from carvustrain import Model
# Create a model
model = Model(name="MyAI", architecture="transformer")
model.knowledge_base.load_grammar_knowledge() # Load 62 grammar facts
model.learn("Python is a programming language.")
model.learn("JavaScript runs in browsers.")
# Ask questions
print(model.ask("What is Python?"))
# Generate real code
code = model.inference_engine.generate_code(
"Write Dijkstra shortest path in Python"
)
print(code)
# Deploy as REST API
model.serve(port=8000)
Features
Core AI
- Model Builder — Architecture selection: transformer, neural_network, CNN, RNN, LSTM, custom
- AI Coding Modes — General, Programmer, Researcher, Teacher, Creative, Security, Data Scientist
- Auto AI Trainer — Automatic batch size, learning rate, and training strategy
- Memory Engine — Long-term conversation memory and context tracking
- Personality System — Configurable style, humor, and creativity traits
- Plugin System — Extensible architecture for custom abilities
Real Code Generation
- 50+ Algorithm Templates — DFS, BFS, Dijkstra, merge sort, linked list ops, tree traversals, DP patterns
- 14+ Programming Languages — Python, JavaScript, TypeScript, Java, C++, Rust, Go, Kotlin, Swift, Bash, Ruby, PHP, R, Scala
- Cross-Language Detection — Auto-detects language from code patterns
- Natural Language Aliases — "depth first search" → DFS, "shortest path" → Dijkstra
Knowledge & Learning
- Semantic Knowledge Base — TF-IDF search (pure Python), optional scikit-learn, optional sentence-transformers
- Learning Validator — Tracks accuracy, knowledge retention, language understanding, comprehension
- English Grammar — 62 grammar facts across 6 categories (parts of speech, tenses, rules, mistakes, style)
- Grammar-Aware Validation — Checks sentence structure and grammar term usage in responses
Deployment
- Model Server — REST API with POST / (ask) and GET / (info) endpoints
- Multi-Format Export — .ct, .json, .bin, .onnx, .gguf
- CLI — 15+ commands: create, init, train, chat, serve, deploy, export, evaluate, benchmark
Agent System
- Goal-Oriented Agents — Train agents for specific tasks
- Multi-Agent Teams — Add sub-agents and orchestrate complex workflows
- Custom Training — Agent-specific training with auto-optimization
CLI Reference
carvustrain create my-ai # Create a new AI project
carvustrain train --data data.txt # Train a model
carvustrain chat --model my.ct # Interactive chat
carvustrain serve --port 8000 # REST API server
carvustrain deploy --model my.ct # Production deployment
carvustrain list # List .ct model files
carvustrain info --model my.ct # Model details
carvustrain export --output out.onnx --format onnx
carvustrain evaluate --model my.ct --data test.txt
carvustrain benchmark --model my.ct --runs 50
carvustrain doctor # System diagnostics
Algorithm Templates
| Algorithm | Python | JavaScript | Rust | Go |
|---|---|---|---|---|
| Binary Search | ✅ | ✅ | ✅ | ✅ |
| Quick Sort | ✅ | ✅ | ✅ | ✅ |
| Merge Sort | ✅ | ✅ | ✅ | ✅ |
| DFS | ✅ | ✅ | ✅ | ✅ |
| BFS | ✅ | ✅ | ✅ | ✅ |
| Dijkstra | ✅ | ✅ | ✅ | ✅ |
| Reverse Linked List | ✅ | ✅ | ✅ | ✅ |
| Detect Cycle | ✅ | ✅ | — | ✅ |
| Tree Traversals | ✅ | ✅ | ✅ | ✅ |
| DP (LCS, Coin, Knap, Edit) | ✅ | — | — | — |
Installation
# From source
git clone https://github.com/AadilFazal/CarvusTrain.git
cd CarvusTrain
pip install -e .
# Optional performance boosters
pip install scikit-learn # Faster TF-IDF
pip install sentence-transformers # Deep embeddings
Project Structure
CarvusTrain/
├── carvustrain/ # Core Package
│ ├── __init__.py # Package entry point
│ ├── model.py # Model, ChatModel, AgentModel, etc.
│ ├── memory.py # KnowledgeBase, LearningValidator, Grammar
│ ├── inference.py # CodeGenerator, QA, Text generation
│ ├── trainer.py # Training loop with validation
│ ├── cli.py # 15+ CLI commands
│ ├── exporter.py # Multi-format export
│ ├── dataset.py # Dataset & DataLoader
│ ├── tokenizer.py # Tokenization suite
│ ├── ... # 20+ modules total
├── docs/ # Documentation
├── tests/ # Test suite
├── examples/ # Example scripts
├── train.ct # Default training config
├── FULL_GUIDE.md # Comprehensive guide
├── pyproject.toml # Package config
└── README.md # This file
License
MIT License — see LICENSE.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file carvustrain-1.0.0.tar.gz.
File metadata
- Download URL: carvustrain-1.0.0.tar.gz
- Upload date:
- Size: 75.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
646f71b67c4827d6a4154f8ebc486f96d684d05fc8a8e4d3fbb38ea44e898c0d
|
|
| MD5 |
87367052b5dd130a77acde6f3ae7712e
|
|
| BLAKE2b-256 |
9ef8521edfd1c5b7c0d94ce789ee955d0b28f5ff886146e88e8279324acd3165
|
File details
Details for the file carvustrain-1.0.0-py3-none-any.whl.
File metadata
- Download URL: carvustrain-1.0.0-py3-none-any.whl
- Upload date:
- Size: 84.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9044c5da85ef1a00f2ab5a5bfdbdcadb4f35a349c2a076c4460f99c3f8f726b0
|
|
| MD5 |
f026eaa83190471bb87e5f79da774209
|
|
| BLAKE2b-256 |
cc0af282a5143726229df6d7c2df45245c856674be71b3d9bf5b612f9b64ef11
|