Skip to main content

Generate per-session LoRA adapters for inference tasks using hypernetwork synthesis

Project description

Tessera Hypernetwork

Generate per-session LoRA adapters for inference tasks using hypernetwork synthesis.

Features

Metadata-to-LoRA: Generate adapters from structured user metadata (JSON) Text-to-LoRA: Generate adapters from natural language descriptions Doc-to-LoRA with SHINE: Generate adapters from document content using SHINE (ICML 2026) for long-context internalization FastAPI: Modern async Python web framework OpenAI-compatible API: Easy integration with existing tooling Installation pip install tessera-hypernetwork Quick Start

Commands

Generate:

From metadata (JSON string or file)

tessera generate
--from-metadata '{"task": "classification", "domain": "medical"}'
--base-model mistralai/Mistral-7B-Instruct-v0.2
--rank 16
--save ./adapter.safetensors

From text description:

tessera generate
--from-text "Medical diagnosis assistant"
--base-model mistralai/Mistral-7B-Instruct-v0.2
--rank 16
--save ./adapter.safetensors

From document:

tessera generate
--from-doc ./document.txt
--base-model mistralai/Mistral-7B-Instruct-v0.2
--rank 16
--save ./adapter.safetensors

'Generate' Sub-Commands:

--from-metadata: JSON metadata string or file path
--from-text: Natural language description
--from-doc: Document content or file path
--base-model: Base model identifier (default: mistralai/Mistral-7B-Instruct-v0.2)
--rank: LoRA rank (default: 16)
--save: Output path for safetensors file (required)
--mode: Generation mode: doc, metadata, or text (auto-inferred if not specified)
Serve

Start the hypernetwork server:

tessera serve --port 8000 --host 0.0.0.0 Options:

--port: Port to serve on (default: 8000)
--host: Host to bind to (default: 0.0.0.0)
--qdrant-url: Qdrant vector database URL (optional)
--workers: Number of worker processes (default: 1)
Health

Check server health status:

tessera health --url http://localhost:8000 Options:

--url: Server URL (default: http://localhost:8000)

List:

List available base models and their dimensions:

tessera list

LoRAX Adapter Management

Import, list, and unload adapters:

Import an adapter:

tessera lorax import-adapter
--path ./adapter.safetensors
--name my-adapter
--base-model mistralai/Mistral-7B-Instruct-v0.2
--server-url http://localhost:8000

List loaded adapters:

tessera lorax list-adapters --server-url http://localhost:8000

Unload an adapter:

tessera lorax unload --name my-adapter --server-url http://localhost:8000

API Endpoints

The hypernetwork service provides a FastAPI server with the following endpoints:

POST /v1/generate - Generate a LoRA adapter for a given prompt
GET /health - Health check endpoint
POST /v1/adapters - Import adapter safetensors
GET /v1/adapters - List loaded adapters
DELETE /v1/adapters/{name} - Unload adapter \

License
Apache-2.0

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

tessera_hypernetwork-1.0.12.tar.gz (46.2 kB view details)

Uploaded Source

Built Distribution

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

tessera_hypernetwork-1.0.12-py3-none-any.whl (53.8 kB view details)

Uploaded Python 3

File details

Details for the file tessera_hypernetwork-1.0.12.tar.gz.

File metadata

  • Download URL: tessera_hypernetwork-1.0.12.tar.gz
  • Upload date:
  • Size: 46.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for tessera_hypernetwork-1.0.12.tar.gz
Algorithm Hash digest
SHA256 271180387734e5f7e05c41f1af4af15f8e75cfc60410f4d5591fe8bba1790ba5
MD5 328b21967ba0e39d5dc9b56d24ef95cd
BLAKE2b-256 5c09b1838525b4e8a978ae0ff4f15cd320f8eb58fadb0b458e5e9f262f441482

See more details on using hashes here.

File details

Details for the file tessera_hypernetwork-1.0.12-py3-none-any.whl.

File metadata

File hashes

Hashes for tessera_hypernetwork-1.0.12-py3-none-any.whl
Algorithm Hash digest
SHA256 b2dfc7fbab83f05eb345c0252dbedf587cf476ab40d2088b6cccc89b49e2fa23
MD5 974023dc6d99d588b28bd3f6aa6456d1
BLAKE2b-256 f8f1b0f3ec4349c964867bf2645b2ff50056f3c3078c73a30ace748ceffc4015

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