Model Information
Available Models
| Mode | Model Name | Size | Description |
|---|---|---|---|
'quantized' | quantized | ~280 MB | Smaller, ~95% accuracy |
'standard' | standard | ~1.1 GB | Full model, best accuracy |
Model Files
Each model includes:model.onnx- The ONNX model filevocab.txt- WordPiece vocabularylabel_map.json- Entity label mapping
Check Model Status
isModelDownloaded()
Check if a model is cached locally.listDownloadedModels()
List all cached models.Download Models
downloadModel()
Manually download a model.ensureModel()
Download if not present, return paths.Clear Cache
clearModelCache()
Remove cached models.Cache Locations
getModelCacheDir()
Get the cache directory path.Node.js Locations
| Platform | Location |
|---|---|
| macOS | ~/Library/Caches/rehydra/models/ |
| Linux | ~/.cache/rehydra/models/ |
| Windows | %LOCALAPPDATA%/rehydra/models/ |
Browser Storage
- OPFS (Origin Private File System) for model files
- Data persists across sessions
Semantic Data Management
Similar functions exist for semantic enrichment data:Download Progress Callback
Pre-Warming
Download models before user interaction:Model Registry
Access model metadata:Offline Usage
After initial download, models work offline:Custom Models
Use your own ONNX model:Model Requirements
- Format: ONNX
- Input: Token IDs, attention mask
- Output: Logits for BIO-tagged entities
- Vocab: WordPiece format
Related
- NER Detection Guide - NER configuration
- createAnonymizer - NER config options