Skip to main content

A model zoo for non-Euclidean embedding models (hyperbolic, spherical, product manifolds)

Project description

hyper-models

A model zoo for non-Euclidean embedding models
Hyperbolic · Spherical · Product Manifolds

Hugging Face License: MIT


Why?

  • Standardized access to non-Euclidean embedding models
  • One catalog surface: model names map to internal loaders such as ONNX or optional torch-backed runtimes
  • Simple APIload() and encode_images()

Installation

uv pip install hyper-models

This base install is the simple path: it stays torch-free and is enough for ONNX-backed catalog entries such as HyCoCLIP and MERU.

For torch-backed checkpoints (for example UNCHA and Hyper3-CLIP):

uv pip install "hyper-models[ml]"

Usage

import hyper_models
from PIL import Image

# List available models
hyper_models.list_models()
# ['hycoclip-vit-s', 'hycoclip-vit-b', 'meru-vit-s', 'meru-vit-b', 'uncha-vit-s', 'uncha-vit-b', 'hyper3-clip-v0.5']

# Inspect supported internal loader kinds
hyper_models.list_loaders()
# ['hyper3-clip-torch', 'onnx', 'uncha-image-torch']

# Load model (auto-downloads from Hugging Face Hub)
model = hyper_models.load("hycoclip-vit-s")
model.geometry  # 'hyperboloid'
model.dim       # 513

# Encode PIL images
images = [Image.open("image.jpg")]
embeddings = model.encode_images(images)  # (1, 513) ndarray

# Get model info
info = hyper_models.get_model_info("hycoclip-vit-s")
info.hub_id     # 'mnm-matin/hyperbolic-clip'
info.loader     # 'onnx'
info.license    # 'CC-BY-NC'

# Low-level: preprocess images yourself
batch = hyper_models.preprocess_images(images)  # (B, 3, 224, 224)
embeddings = model.encode(batch)

Architecture

hyper-models is intended to be a timm-like catalog for non-Euclidean models.

  • The public abstraction is the catalog entry name, for example hycoclip-vit-s.
  • Each entry declares metadata such as geometry, dimensionality, artifact path, and an internal loader kind.
  • Internal loaders may differ by model family:
    • onnx for exported, torch-free runtimes
    • uncha-image-torch for raw checkpoints that need a PyTorch image runtime
    • hyper3-clip-torch for Hyper3-CLIP safetensors checkpoints

This keeps callers on one stable API:

model = hyper_models.load("hycoclip-vit-s")
model = hyper_models.load("uncha-vit-b")
model = hyper_models.load("hyper3-clip-v0.5")

Callers do not need to know which internal loader is used, except for optional dependency installation when choosing entries that need hyper-models[ml].

HyperView integration

HyperView auto-detects hyper-models names and routes them to the hyper-models provider.

import hyperview as hv

dataset = hv.Dataset.from_huggingface(
  name="demo",
  hf_dataset="uoft-cs/cifar10",
  split="train",
  image_key="img",
)

# Uses provider='hyper-models' automatically.
space_key = dataset.compute_embeddings(model="uncha-vit-b")
layout_key = dataset.compute_visualization(space_key=space_key, layout="poincare")

HyperView's simple path remains torch-free. If you use the default ONNX-backed hyper-models entries or the default embed-anything provider, HyperView does not need PyTorch. PyTorch is only needed when you explicitly select a torch-backed catalog entry such as uncha-vit-s, uncha-vit-b, or hyper3-clip-v0.5.

Models

Hyperbolic

Model Available Paper Code
hycoclip-vit-s HF ICLR 2025 PalAvik/hycoclip
hycoclip-vit-b HF ICLR 2025 PalAvik/hycoclip
meru-vit-s HF ICML 2023 facebookresearch/meru
meru-vit-b HF ICML 2023 facebookresearch/meru
uncha-vit-s HF CVPR 2026 jeeit17/UNCHA
uncha-vit-b HF CVPR 2026 jeeit17/UNCHA
hyper3-clip-v0.5 HF Hyper3Labs/hyper3-clip
hyp-vit CVPR 2022 htdt/hyp_metric
hie CVPR 2020 leymir/hyperbolic-image-embeddings
hcnn ICLR 2024 kschwethelm/HyperbolicCV

Hyperspherical

Model Available Paper Code
megadescriptor (via timm) HF WACV 2024 WildlifeDatasets/wildlife-datasets
sphereface CVPR 2017 wy1iu/sphereface
arcface CVPR 2019 deepinsight/insightface

Product Manifolds

Model Available Paper Code
hyperbolics ICLR 2019 HazyResearch/hyperbolics

Export Tooling

This repo also contains tooling to export PyTorch models to ONNX:

cd export/hycoclip
uv run python export_onnx.py --checkpoint model.pth --onnx model.onnx

See export/hycoclip/README.md for details.

References

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

hyper_models-0.3.0.tar.gz (43.7 kB view details)

Uploaded Source

Built Distribution

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

hyper_models-0.3.0-py3-none-any.whl (51.1 kB view details)

Uploaded Python 3

File details

Details for the file hyper_models-0.3.0.tar.gz.

File metadata

  • Download URL: hyper_models-0.3.0.tar.gz
  • Upload date:
  • Size: 43.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for hyper_models-0.3.0.tar.gz
Algorithm Hash digest
SHA256 555e6b39cb0e9150a2c3521e5d510d890dc301d5c70c2ad5b38012da7333fa12
MD5 5e941917fdea10c86a3d4ed0fd23676b
BLAKE2b-256 660cda5e6af88e64dc92d64e1941a206fbb4f545889c6ae2252d64075adf894e

See more details on using hashes here.

Provenance

The following attestation bundles were made for hyper_models-0.3.0.tar.gz:

Publisher: release.yml on Hyper3Labs/hyper-models

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hyper_models-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: hyper_models-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 51.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for hyper_models-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cf2c2ab118b93fb1e64b30e87067e0ee05eca80ef5a778b34cb9b4b679b644ae
MD5 8c9dce3fea895d380fc29ea246536436
BLAKE2b-256 b4c5ac87755870102c09b9f999c3bbc461b2de04a7b81376d653ff04aa5c9fbb

See more details on using hashes here.

Provenance

The following attestation bundles were made for hyper_models-0.3.0-py3-none-any.whl:

Publisher: release.yml on Hyper3Labs/hyper-models

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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