This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
GrillyDistil
Temperature-scaled knowledge distillation with SA-KD — optional grilly extension.
Features
- SA-KD Temperature — simulated annealing-based adaptive temperature
- Linear Annealing — fallback T=8 -> T=2 over first 30% of steps
- Expanded Prompts — 50 seed prompts per domain (200 total seeds)
- Distillation Trainer — full training loop with KL-divergence loss
- Compression Synergy — high-T phases produce 2-3x better compression ratios
Quick Start
pip install grillydistil
from grillydistil import SAKDTemperature, DistillationTrainer, PromptGenerator
# SA-KD Temperature
temp = SAKDTemperature(T_init=8.0, alpha=0.97)
for step in range(1000):
loss = train_step(temperature=temp.current_temperature)
new_T = temp.step(loss)
# Generate training prompts
gen = PromptGenerator(prompts_per_domain=500)
prompts = gen.generate() # 2000 total prompts across 4 domains
# Full distillation
trainer = DistillationTrainer(student_model, teacher_model, tokenizer)
losses = trainer.train(dataset, epochs=3)
SA-KD Algorithm
- Start with T_init=8.0 (high temperature -> smooth teacher logits)
- Propose T' = T + random perturbation
- Metropolis acceptance: P = min(1, exp(-dE / T_SA))
- SA cooling: T_SA *= 0.97 each step
- Converges to optimal temperature for student capacity
Requirements
- Python 3.12+
- grilly >= 0.4.0
- grillyinference >= 0.1.0
- numpy
License
MIT
Metadata
Release files for grillydistil 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| grillydistil-0.1.0.tar.gz | 22.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| grillydistil-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 35.9 kB
Release files / grillydistil-0.1.0.tar.gz
| Download URL | grillydistil-0.1.0.tar.gz |
|---|---|
| Size | 22.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4a3bdb11d798e65773bd36e2668645fedad4e8ff22226bf0db06fd6cf0136fb0
|
|
BLAKE2b-256 checksum How to use checksums |
e370753d90ba8c56fd74c441aab9e33c58d33d2b8b847417d64d6eb6b903933c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 22, 2026.
Transparency logRelease files / grillydistil-0.1.0-py3-none-any.whl
| Download URL | grillydistil-0.1.0-py3-none-any.whl |
|---|---|
| Size | 13.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
17d4d5c43d39cd4bf81d440221dc6b36470e698816ca236ab95ba5ceadba6b9e
|
|
BLAKE2b-256 checksum How to use checksums |
f178fb25d321420f945f524d447e22454edcbce579ce2a51a1bdd3152536e29c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 22, 2026.
Transparency log