Skip to content

Model zoo for non-Euclidean embedding models (hyperbolic, hyperspherical) - ONNX exports for HyperView

License

Notifications You must be signed in to change notification settings

Hyper3Labs/hyper-models

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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
  • Torch-free runtime via ONNX (models published to Hugging Face Hub)
  • Simple APIload() and encode_images()

Installation

pip install hyper-models

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']

# 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.license    # 'CC-BY-NC'

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

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

About

Model zoo for non-Euclidean embedding models (hyperbolic, hyperspherical) - ONNX exports for HyperView

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages