Skip to main content

How-Agentic: a tutorial-first framework for training a small agent model from scratch

Project description

How-Agentic

How-Agentic is a tutorial-first framework for training a small agent model from scratch.

The current release is the M0 closed-loop baseline. It is intentionally small and practical: the goal is to make the full path reproducible before moving on to more agentic behavior training.

tokenizer -> pretrain -> format-only SFT -> export -> infer -> HuggingFace-compatible export

M0 Status

M0 is complete and frozen.

  • Pretrained checkpoint: out/hello_agent_100m/pretrain/final.pt
  • SFT checkpoint: out/hello_agent_100m/sft/final.pt
  • Tokenizer: tokenizers/hello-agent-16k
  • Pretrain data: data/demo/m0_pretrain_100k.jsonl
  • SFT data: data/demo/m0_sft_format_500.jsonl
  • Pretrain infer mode: completion
  • SFT infer mode: chat

Model checkpoints and datasets are not included in the PyPI package.

Install

Minimal CLI install:

pip install how-agentic

M0 training environment, verified on Python 3.12 + CUDA 12.4:

pip install -r requirements/m0-py312-cu124.txt
pip install -e . --no-deps

Or with uv:

uv venv .venv --python 3.12
uv pip install -r requirements/m0-py312-cu124.txt
uv pip install -e . --no-deps

CLI

python -m how_agentic.cli --help

or:

how-agentic --help

M0 Quick Path

Train tokenizer:

python -m how_agentic.cli train-tokenizer --data data/demo/m0_pretrain_100k.jsonl --output tokenizers/hello-agent-16k --vocab-size 16000

Pretrain:

python -m how_agentic.cli train --config configs/hello_agent_pretrain_100k.yaml

Export pretrained model:

python -m how_agentic.cli export --checkpoint out/hello_agent_100m/pretrain/final.pt --output models/hello_agent_100m_native

Infer with pretrained model:

python -m how_agentic.cli infer --model models/hello_agent_100m_native --prompt "Once upon a time" --mode completion --max-tokens 50 --temperature 0

Build M0 format-only SFT data:

python scripts/build_m0_format_sft_dataset.py --output data/demo/m0_sft_format_500.jsonl --total 500 --seed 42

Run M0 SFT:

python -m how_agentic.cli train --config configs/hello_agent_sft.yaml

Export SFT model:

python -m how_agentic.cli export --checkpoint out/hello_agent_100m/sft/final.pt --output models/hello_agent_100m_sft_native

Infer with SFT model:

python -m how_agentic.cli infer --model models/hello_agent_100m_sft_native --prompt "What is the capital of France?" --mode chat --max-tokens 80 --temperature 0

Expected shape:

<answer>
The capital of France is Paris.
</answer>

Docs

Quickstart:

docs/quickstart.md

M0 reproduction:

docs/m0-reproduction.md

CLI reference:

docs/cli-reference.md

Configuration guide:

docs/configuration.md

Roadmap:

docs/roadmap.md

Publishing:

docs/publishing.md

Package Boundary

PyPI contains the framework code and CLI.

The following are intentionally kept outside the wheel:

  • checkpoints
  • exported models
  • tokenizer artifacts
  • training data
  • logs
  • local caches

Use HuggingFace Hub for model weights and GitHub for reproducibility docs, configs, scripts, and tests.

License

This project is licensed under CC BY-NC-SA 4.0.

Attribution is required, commercial use is not allowed, and derivative works must use the same 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

how_agentic-0.1.1.tar.gz (84.5 kB view details)

Uploaded Source

Built Distribution

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

how_agentic-0.1.1-py3-none-any.whl (80.0 kB view details)

Uploaded Python 3

File details

Details for the file how_agentic-0.1.1.tar.gz.

File metadata

  • Download URL: how_agentic-0.1.1.tar.gz
  • Upload date:
  • Size: 84.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for how_agentic-0.1.1.tar.gz
Algorithm Hash digest
SHA256 e30475038bf7869f6c9c8351de149e4b24b0d2591600dba1633547becc502ef6
MD5 2a156c15089853c7eea5e0b02f64eb85
BLAKE2b-256 dd7b72129b8edf7939fbd8160d8b989c576765203899d0ecd9402011e6276e15

See more details on using hashes here.

File details

Details for the file how_agentic-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: how_agentic-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 80.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for how_agentic-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 60e62ff0af44bd30bdd1a3da977efcfd222fc2edec8f2386774d8e8db01bd25d
MD5 986473e736b84b48e5aec143f8c17736
BLAKE2b-256 8bdd25882f770d117eaf20cb5bb3edf9ae3f5f673b97d6566e169910b095268a

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