<C/> loading...

<section id="kotsudbi">

Cat of Destiny

An app of the HealSpirit portal: numerology, destiny matrix and natal chart readings, a personal Soul Crystal, sound therapy and daily affirmations. The idea and the coordination of the project belong to Sasha Spirit. My part is the engineering: a local LLM, a knowledge base for it and the crystal generator. All of it runs on one home server, without cloud AI services.

healspirit.ru/glow Saiga YandexGPT 8B RAG · pgvector GBNF SDXL Turbo + ControlNet

</section>

36 s
The Cat's reading
median
48 s
Destiny matrix
median
66 s
Natal chart
median
50 s
Crystal image
on two GPUs

What Is Inside

Code calculates, the model writes

// numerology

The Cat's Reading

The life path, soul and expression numbers are calculated by Python from the birth date and the name; karmic lessons are calculated by code too. The model writes four blocks of text: the three numbers and how they combine.

// matrix

Destiny Matrix

Five points on the 22 major arcana: personality, spirit, body and lineage, social mask, mission. The arcana come from formulas; the model writes six blocks, one per point plus an integration.

// astrology

Natal Chart

The positions of ten planets, twelve Placidus houses and the aspects are calculated by Swiss Ephemeris from the date, time and place of birth. The model writes six blocks of interpretation.

// crystal

Soul Crystal

A personal mandala. Code builds the geometry from the numbers, the zodiac sign and the Moon phase, a diffusion model turns the drawing into a picture, and the LLM explains what is encoded in it.

// sound

Sound Therapy

Tracks with binaural beats and solfeggio frequencies are synthesised in advance with numpy. No LLM and no speech synthesis here: a track is picked for a state by a plain table.

// affirmations

Affirmations

A daily affirmation for the life path number arrives on schedule through Celery beat and Telegram. The texts are a library written in advance, not generated on the fly.

The Knowledge Base

Where the model gets what it was never taught

A general-purpose model writes about numerology and arcana smoothly and about nothing in particular. For a reading to be specific it needs material, and that material was collected for the project. The starting point was a study by Sasha Spirit: eleven sections, from sound therapy and biorhythms to sacred geometry, Platonic solids and numerology, with more than seventy links to sources.

The study was a reference book: tables, lists, short definitions. For RAG that is a poor format: lists break into incoherent pieces, and a small model copies the list form into its answer. So every unit — a number, a Platonic solid, a crystal, a chakra, a frequency — was expanded into connected text on one template: character, strengths and weaknesses, life tasks. Whole paragraphs, no lists and no emoji, fifteen hundred to two thousand words each.

Drafts of these texts were prepared with large language models on a fixed template, and a reference version with sources was collected in parallel to check the facts. The tone is set by a separate profile built from Sasha's publications: a warm, informal address without officialese or pathos. Only the tone was taken from her style, not the genre.

# knowledge bases
numerology 12 numbers: 1–9, 11, 22, 33
matrix 22 arcana + 5 positions
astrology 12 signs · 10 planets · 12 houses · 5 aspects
sound 7 chakras · 9 solfeggio frequencies
# storage
chunks ~500 tokens each
embeddings multilingual-e5-large · 1024 dim · CPU
index pgvector · HNSW · cosine
# into the request
1 exact descriptions for the values in the chart
2 fallback semantic search over chunks
3 format GBNF grammar: headings and blocks

The form of the text matters more than its volume

The first numerology base, four chunks of short descriptions, gave a reading of about 1,500 characters with a scatter of emoji and lofty phrases. The second, fifteen chunks of expanded text, gave 2,600 characters without a single emoji and with specifics: professions, shadow sides.

Exact lookup instead of search

Semantic search barely tells a four from a seven: almost the same fragments came back for any chart. Now descriptions are taken exactly for the numbers, arcana and planets of the chart, and search remains a fallback. A block names the archetype of its own number in 94 cases out of 108.

The grammar holds the format

An 8B model does not hold a long instruction, so the structure of the answer is set by a GBNF grammar in the request: llama.cpp will not let it generate a token that breaks the grammar. In the control series all 36 readings out of 36 came in clean format. A truncated or looped answer goes to a retry, and known word distortions are fixed in post-processing.

Soul Crystal

How to teach a diffusion model sacred geometry without training it

Control image: Flower of Life, frame, ring of twelve nodes, Moon arc
The drawingBuilt by code: the Flower of Life, the frame, a ring of twelve nodes and the Moon arc.
Finished Soul Crystal
The crystalThe diffusion model paints along the lines; the cube, the star and the Seed of Life are laid on top.
The same crystal with another seed
Another seedThe same drawing and the same person: the geometry is identical, the matter is different.

Diffusion models are bad at exact geometry. Ask for a Flower of Life and you get something round and pretty, but there will not be 37 circles and they will intersect wherever they happen to. We did not fine-tune the model. Instead the roles are split: code is responsible for the geometry, the model only for the matter — light, texture, depth, the cosmic background.

A Python generator builds the drawing from nine layers by composition rules formulated by Sasha Spirit. The Flower of Life of 37 circles takes up almost the whole canvas, and everything else is not laid over it but inscribed into its lattice. The cube is drawn as a corner projection of Metatron's Cube, the rays of the star land on the nodes of the flower, and all lines have the same thickness.

The drawing goes to SDXL Turbo through ControlNet, and the model paints strictly along the lines. Diffusion still distorts thin exact figures, so it only receives the flower, the frame and the ring of nodes. The Platonic solid, the star and the Seed of Life are drawn mathematically with fourfold supersampling and laid over the finished picture.

# one crystal
1 PARAMS name + birth date → numbers, sign, year, Moon phase
2 GEOMETRY Python · 9 layers → control image 1024²
3 DIFFUSION SDXL Turbo + ControlNet canny · ComfyUI
4 UPSCALE 1024 → 2048
5 OVERLAY exact figures · 4× supersampling
6 OUTPUT WebP master 2048 + preview 1024
7 TEXT LLM description, in parallel with the image
# image ~50 s on two P104-100 · with text ~84 s
What is known about the person What it becomes in the crystal
Life path numberThe Platonic solid in the centre: tetrahedron, cube, octahedron, dodecahedron or icosahedron; a merkaba or the Flower of Life itself for master numbers
Soul numberThe number of rays of the soul star inside the solid
Chakra of the life pathThe main colour and the palette of the picture
Zodiac signThe figure of its element and the metal of the lines: red gold, bronze or silver
Year in the Chinese calendarOne of the twelve nodes of the ring and the accent colour of the element
Moon phase at birthThe outer arc
Personality numberThe ornament of the frame: dots, dashes or teeth
Day of birthThe colour of the central point

Sixteen versions in two days

The first version simply drew figures over one another. Then came iterations on Sasha's composition notes: one canonical flower of three rings, a solid for every life path number, a mirrored merkaba, an eight-pointed star for air signs, separate colours for four layers.

Fitted to the hardware

On Pascal cards ComfyUI computes in fp32, and SDXL with ControlNet does not fit into 8 GB. So the pipeline is spread over two cards with custom ComfyUI nodes: the UNet on one, ControlNet, VAE and CLIP on the other. An image takes about 50 seconds instead of about 100.

A description for every crystal

While the picture is being painted, the LLM writes in parallel what is encoded in the crystal: which element stands for what for this particular person. If the model does not answer, the crystal is still ready: the description is an optional part.

Tech Stack

// PRODUCT

Django + Celery on the backend, Next.js on the frontend, PostgreSQL with pgvector, MinIO for images. Calculations are plain Python and Swiss Ephemeris. Images: ComfyUI with SDXL Turbo and ControlNet canny. Embeddings: multilingual-e5-large on CPU.

// LLM

Saiga YandexGPT 8B in two llama.cpp instances, an OpenAI-compatible API with GBNF grammars, eight request slots behind a balancer. The model, the server and the monitoring are described on a separate page.

Learn more about Saiga →

Want to integrate local AI?

Local LLM deployment for your business — data security, full control, no cloud costs. Let's discuss your use case.

Send Request