Torch and CUDA helper toolkit for AI training and inference workflows.
Project description
coremate
CoreMate is a lightweight Python toolkit focused on Torch and CUDA optimization for AI workflows.
PyPI release page:
https://pypi.org/project/coremateai/0.1.1/
Installation
pip install coremateai==0.1.1
Optional extras:
pip install "coremateai[ai]"
Install PyTorch separately (matching your CUDA runtime):
pip install torch
What It Does
- Detects AI stack details (
torch, CUDA, GPU, driver). - Recommends training presets by task (
cv,nlp,llm, etc.). - Builds full training plans (
build_training_plan) with LR, batch and accumulation heuristics. - Applies reproducibility helpers (
set_global_seed). - Tunes Torch runtime (
cudnn, TF32, matmul precision, threads). - Applies CUDA allocator/env defaults.
- Provides one-shot optimization (
optimize_torch_cuda).
Python Usage
from coremate import (
detect_ai_stack,
recommend_training_preset,
build_training_plan,
set_global_seed,
tune_torch_runtime,
apply_cuda_env_defaults,
optimize_torch_cuda,
)
stack = detect_ai_stack()
print(stack["cuda_available"], stack["torch_version"])
preset = recommend_training_preset(task="llm", aggressive=True, hardware=stack)
print(preset.batch_size, preset.precision)
plan = build_training_plan(
task="llm",
model_scale="base",
target_global_batch_size=64,
aggressive=True,
hardware=stack,
)
print(plan.global_batch_size, plan.learning_rate)
set_global_seed(42, deterministic=True)
apply_cuda_env_defaults(max_split_size_mb=256, expandable_segments=True)
tune_torch_runtime(seed=42, deterministic=True, benchmark=True, allow_tf32=True)
result = optimize_torch_cuda(
task="llm",
model_scale="base",
target_global_batch_size=64,
aggressive=True,
seed=42,
deterministic=True,
)
print(result["plan"]["global_batch_size"], result["tune_error"])
CLI Usage
coremate ai report
coremate ai recommend --task llm --aggressive
coremate ai plan --task llm --model-scale base --target-global-batch 64 --aggressive
coremate ai seed --seed 42 --deterministic
coremate ai env --max-split-size-mb 256 --expandable-segments
coremate ai tune --seed 42 --deterministic --benchmark --allow-tf32
coremate ai optimize --task llm --model-scale base --target-global-batch 64 --aggressive --seed 42 --deterministic
Testing
python -m pytest
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
coremateai-0.1.1.tar.gz
(13.0 kB
view details)
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 coremateai-0.1.1.tar.gz.
File metadata
- Download URL: coremateai-0.1.1.tar.gz
- Upload date:
- Size: 13.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
070bcf08322fb8f2a658118c0c7b1e4c38b6cf7c9f34e4ea534466084e59c645
|
|
| MD5 |
e724a8e34876b1218679d58139dfd746
|
|
| BLAKE2b-256 |
f78975e4ff16eae85b7ada932bfdfe16b7149d3ed5aab75939fec89749d8b081
|
File details
Details for the file coremateai-0.1.1-py3-none-any.whl.
File metadata
- Download URL: coremateai-0.1.1-py3-none-any.whl
- Upload date:
- Size: 10.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1c6cb1adb735c19922492bbcb227b738dff2398d8b20c833081bf7467f8a5931
|
|
| MD5 |
2b4b09ca36c249de3982aaf7c3a13ce5
|
|
| BLAKE2b-256 |
628b6729778b703468c96e3cc9df2bf7ddc49bdfc05242256d540757e930a84e
|