Generate per-session LoRA adapters for inference tasks
Project description
Tessera Hypernetwork
Generate per-session LoRA adapters for inference tasks. This is the Python hypernetwork service component of Tessera, which works alongside the Rust core to provide LoRA adapter generation via hypernetwork synthesis.
Features
- Doc-to-LoRA with SHINE: Generate adapters from document content using SHINE (ICML 2026) for long-context internalization
- Text-to-LoRA: Generate adapters from natural language descriptions
- Metadata-to-LoRA: Generate adapters from structured user metadata
- OpenAI-compatible API: Easy integration with existing tooling
- FastAPI: Modern async Python web framework
Installation
pip install tessera-hypernetwork
Usage
Start the hypernetwork server:
python -m tessera_hypernetwork.server
Or use the CLI:
tessera-hypernetwork serve
API
The hypernetwork service provides a FastAPI server with the following endpoints:
POST /v1/generate- Generate a LoRA adapter for a given promptGET /health- Health check endpoint
Development
Install development dependencies:
pip install tessera-hypernetwork[dev]
Run tests:
pytest
Integration with Tessera
This hypernetwork service is designed to work with the Tessera Rust core. The Rust core handles semantic caching, vector similarity search, and adapter composition, while this Python service handles the actual LoRA adapter generation via hypernetwork synthesis.
Full Tessera CLI Lifecycle
The complete Tessera system provides a comprehensive CLI for all operations:
# Show version
tessera --version
# Generate a LoRA adapter
tessera generate "Senior litigation associate specializing in IP law" \
--base-model meta-llama/Llama-3-8B \
--rank 16 \
--output ./adapter.safetensors
# Start the API server
tessera serve --port 8080
# Check if Tessera is running
tessera health --url http://localhost:8080
# List cached adapters
tessera list
tessera list --base-model meta-llama/Llama-3-8B
# Cache management
tessera cache clear
tessera cache stats
tessera cache prune --max-age-days 7
# LoRAx operations
tessera lorax import --path ./adapter.safetensors --name my-adapter
tessera lorax list
tessera lorax unload --name my-adapter
# PEFT operations
tessera peft import --path ./adapter.safetensors --name my-adapter
tessera peft unload --name my-adapter
For the complete Tessera system, see: https://github.com/theoddden/Tessera
License
Apache-2.0
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
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 tessera_hypernetwork-0.2.4.tar.gz.
File metadata
- Download URL: tessera_hypernetwork-0.2.4.tar.gz
- Upload date:
- Size: 10.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
47e42c5fc89b63386e92965bd594a4225d162dfe22b7b9b4ec7703d6da21de25
|
|
| MD5 |
5067167283f98334cadb9a689489fe1a
|
|
| BLAKE2b-256 |
3efb026a61b47e2ab4ee7d93123825233a09a37f35fc30c7c4b31c1fc426b187
|
File details
Details for the file tessera_hypernetwork-0.2.4-py3-none-any.whl.
File metadata
- Download URL: tessera_hypernetwork-0.2.4-py3-none-any.whl
- Upload date:
- Size: 12.5 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 |
79f96a6deb3aaa595dcf04c89b1b868043dce257136ecae060fbb5787e19e44d
|
|
| MD5 |
4f8ddcdb104e279f6d709fa1de063b36
|
|
| BLAKE2b-256 |
b95fe2cebcbbf456a559b9afdf1127b9853c6bc807609b4b10c5c22e95ade6ee
|