Download examples/build_my_model.py from Snapkitty/summon: direct link, hf CLI and curl.
- Browser
- Download file 2.13 kB
-
https://huggingface.co/Snapkitty/summon/resolve/main/examples/build_my_model.py
- Command line
-
hf download hf://Snapkitty/summon/examples/build_my_model.py
-
curl -L -o build_my_model.py https://huggingface.co/Snapkitty/summon/resolve/main/examples/build_my_model.py
2.13 kB
| # Example: Build your own sovereign model with Summon | |
| # pip install summon | |
| # python examples/build_my_model.py | |
| from summon import Summon | |
| # ββ Option A: Full pipeline βββββββββββββββββββββββββββββββββββ | |
| model = ( | |
| Summon.begin("AhmadMeta-v1") # name it whatever you want | |
| .base("nemotron-mini-4b") # pick your base model | |
| .corpus(layers=[ # point at your training data | |
| "data/the_book.jsonl", | |
| "data/enoch.jsonl", | |
| "data/circle7.jsonl", | |
| ]) | |
| .constitutional([ # your model's principles | |
| "truth", | |
| "sovereignty", | |
| "evidence", | |
| "no_deception", | |
| ]) | |
| .license("sovereign-source-v1") # how you release it | |
| .train(device="cuda", epochs=3) # train on your GPU | |
| .push("my-org/AhmadMeta-v1") # push to HuggingFace | |
| ) | |
| model.manifest() | |
| # ββ Option B: Corpus builder + model separately βββββββββββββββ | |
| from summon import Summon | |
| corpus = ( | |
| Summon.corpus() | |
| .layer(0, "data/the_book.jsonl", name="genesis") | |
| .layer(1, "data/enoch.jsonl", name="enochian") | |
| .layer(2, "data/gospels.jsonl", name="hidden_gospels") | |
| .layer(3, "data/circle7.jsonl", name="sovereign_lineage") | |
| .layer(4, "data/book_of_dead.jsonl", name="world_wisdom") | |
| .layer(5, "data/masters.jsonl", name="masters_of_art") | |
| .seal() | |
| ) | |
| model = ( | |
| Summon.begin("JessicaLM-v1") | |
| .base("llama3-8b") | |
| .corpus(corpus_obj=corpus) | |
| .constitutional(["truth", "care", "sovereignty"]) | |
| .license("apache-2.0") | |
| .train(device="cuda", epochs=5, batch_size=8) | |
| .push("jessica-org/JessicaLM-v1") | |
| ) | |
| # ββ Option C: Dry run (validate config, no GPU needed) ββββββββ | |
| model = ( | |
| Summon.begin("TestModel-v1") | |
| .base("phi3-mini") | |
| .corpus(layers=["data/sample.jsonl"]) | |
| .constitutional(["truth"]) | |
| .train(dry_run=True) # just validates config | |
| ) | |
| model.manifest() | |