Skip to main content

Tessera Hypernetwork

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

Version: 1.4.0

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
  • Base Model Management: Download, cache, and serve base models with vLLM integration
  • FastAPI: Modern async Python web framework
  • OpenAI-compatible API: Easy integration with existing tooling

Installation

pip install tessera-hypernetwork

Quick Start

Generate LoRA Adapters

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

Base Model Management

Download a base model from HuggingFace Hub:

tessera model pull mistralai/Mistral-7B-Instruct-v0.2
tessera model pull meta-llama/Llama-3.1-8B-Instruct
tessera model pull deepseek-ai/DeepSeek-R1-Distill-Qwen-7B

Start vLLM with a base model:

tessera model serve-model mistralai/Mistral-7B-Instruct-v0.2 --port 8000
tessera model serve-model mistralai/Mistral-7B-Instruct-v0.2 --gpu-memory-utilization 0.9
tessera model serve-model mistralai/Mistral-7B-Instruct-v0.2 --quantization awq

List cached base models:

tessera model list-models

Remove a cached model:

tessera model remove mistralai/Mistral-7B-Instruct-v0.2

Start Tessera Server

Start the hypernetwork server (with auto vLLM):

tessera serve --port 8080 --base-model mistralai/Mistral-7B-Instruct-v0.2

Start the hypernetwork server (standalone):

tessera serve --port 8080 --host 0.0.0.0

Check Server Health

tessera health --url http://localhost:8080

List Available Models

tessera list

Commands

Generate

Generate LoRA adapters from metadata, text, or documents.

Options:

  • --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)

Model Management

Manage base models for vLLM serving.

tessera model pull <model_id> Download a base model from HuggingFace Hub and cache locally.

tessera model serve-model <model_id> Start vLLM with a specified base model.

Options:

  • --port: Port to serve on (default: 8000)
  • --gpu-memory-utilization: GPU memory utilization fraction (e.g., 0.9)
  • --tensor-parallel-size: Tensor parallel size (default: 1)
  • --quantization: Quantization method (e.g., awq, gptq, bitsandbytes)
  • --max-model-len: Maximum model length (default: 8192)

tessera model list-models List all locally cached base models.

tessera model remove <model_id> Remove a cached base model to free disk space.

Serve

Start the Tessera hypernetwork server.

Options:

  • --port: Port to serve on (default: 8080)
  • --host: Host to bind to (default: 0.0.0.0)
  • --qdrant-url: Qdrant vector database URL (optional)
  • --workers: Number of worker processes (default: 1)
  • --base-model: Base model to auto-start vLLM with (e.g., mistralai/Mistral-7B-Instruct-v0.2)
  • --vllm-port: Port for vLLM server (default: 8000)

Health

Check server health status.

Options:

  • --url: Server URL (default: http://localhost:8080)

List

List available base models and their dimensions, plus cached models.

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:8080

List loaded adapters:

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

Unload an adapter:

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

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

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.4.0.tar.gz (62.0 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.4.0-py3-none-any.whl (69.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: tessera_hypernetwork-1.4.0.tar.gz
  • Upload date:
  • Size: 62.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for tessera_hypernetwork-1.4.0.tar.gz
Algorithm Hash digest
SHA256 2fc26ad9b611bf721f55caa775d72ad2341b955f4bd2584c1525e4c632675e0c
MD5 f68c997ea56799d7328b853bda4adb4e
BLAKE2b-256 5066a479d496dacf236ec39d57aec071fe38abc1e4232d8c61f6a369c3911063

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tessera_hypernetwork-1.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2ab4132c42453d00c3defe88de6b3ea001f8ef37c4b12eb28453d38acf95d5e5
MD5 d18b042a05ade950ba0e1f266377754b
BLAKE2b-256 573cf2626310f25c8b8c64c56f8b8cb1ee100f5d233661f9c3877be3ded57121

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.4.0 This release

2 files

1.3.11

2 files

1.3.10

2 files

1.3.9

2 files

1.3.8

2 files

1.3.7

2 files

1.3.6

2 files

1.3.5

2 files

1.3.4

2 files

1.3.3

2 files

1.3.2

2 files

1.3.1

2 files

1.3.0

2 files

1.2.2

2 files

1.2.1

2 files

1.2.0

2 files

1.1.2

2 files

1.1.1

2 files

1.1.0

2 files

1.0.18

2 files

1.0.17

2 files

1.0.16

2 files

1.0.15

2 files

1.0.14

2 files

1.0.13

2 files

1.0.12

2 files

1.0.11

2 files

1.0.10

2 files

1.0.9

2 files

1.0.8

2 files

1.0.7

2 files

1.0.6

2 files

1.0.5

2 files

1.0.4

2 files

1.0.3

2 files

1.0.2

2 files

1.0.1

2 files

1.0.0

2 files

0.2.20

2 files

0.2.19

2 files

0.2.18

2 files

0.2.17

2 files

0.2.16

2 files

0.2.15

2 files

0.2.14

2 files

0.2.13

2 files

0.2.12

2 files

0.2.11

2 files

0.2.10

2 files

0.2.9

2 files

0.2.8

2 files

0.2.7

2 files

0.2.6

2 files

0.2.5

2 files

0.2.4

2 files

0.2.3

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page