Feature Extraction
sentence-transformers
Safetensors
Model2Vec
static-embeddings
moderation
safety
abuse-detection
lf2
2bit-quantization
cpu-optimized
Run this model with HF Jobs
Run VTXAI/VTX-MOD-1 on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/VTXAI/VTX-MOD-1. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/VTXAI/VTX-MOD-1 on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use VTXAI/VTX-MOD-1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use VTXAI/VTX-MOD-1 with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("VTXAI/VTX-MOD-1") sentences = [ "The weather is lovely today.", "It's so sunny outside!", "He drove to the stadium." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] - Model2Vec
How to use VTXAI/VTX-MOD-1 with Model2Vec:
from model2vec import StaticModel model = StaticModel.from_pretrained("VTXAI/VTX-MOD-1") embeddings = model.encode(["It's dangerous to go alone!", "It's a secret to everybody."]) print(embeddings.shape) - Notebooks
- Google Colab
- Kaggle
Upload README.md with huggingface_hub
Browse files1 unmodified line234567891011121314151617181920212223242526272829303132333435363738394041424344454647481 unmodified linelicense: apache-2.0base_model: VTXAI/vtx-jev-mod-multilingualpipeline_tag: feature-extractiontags:- sentence-transformers- static-embeddings- model2vec- moderation- 100-languages- fast-inference- cpu-optimized---# VTX-MOD-1Ultra-fast **Static Embedding Model** distilled from [**VTXAI/vtx-jev-mod-multilingual**](https://huggingface.co/VTXAI/vtx-jev-mod-multilingual) with controlled 256 dimensions.Built using `model2vec` and `sentence-transformers` StaticEmbedding framework.### Specifications:- **Base Teacher**: `VTXAI/vtx-jev-mod-multilingual` (256,000 multilingual vocabulary)- **Output Dimensions**: 256 (Controlled via PCA + SIF weighting)- **Speed**: Up to 500x faster than standard transformers on CPU- **Coverage**: 100+ languages including Hindi, Bengali, Tamil, Telugu, Marathi, Urdu, Arabic, Chinese, Spanish, Russian, English.### Quick Usage:#### Using Sentence Transformers:```pythonfrom sentence_transformers import SentenceTransformermodel = SentenceTransformer("VTXAI/VTX-MOD-1")embeddings = model.encode(["नमस्ते, क्या आप मेरी सहायता कर सकते हैं?","This is a safe sentence.","Very fast CPU inference!"])print(embeddings.shape) # (3, 256)```#### Using Model2Vec:```pythonfrom model2vec import StaticModelmodel = StaticModel.from_pretrained("VTXAI/VTX-MOD-1")embeddings = model.encode(["Hello world", "வணக்கம்"])```1 unmodified line234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171 unmodified linelicense: apache-2.0base_model: VTXAI/vtx-jev-mod-multilingualpipeline_tag: feature-extractionlanguage:- multilingual- en- hi- bn- ta- te- mr- ur- ar- es- ru- zhtags:- sentence-transformers- static-embeddings- model2vec- moderation- safety- abuse-detection- lf2- 2bit-quantization- cpu-optimized---# VTX-MOD-1**VTX-MOD-1** is an ultra-fast, lightweight **Multilingual Content Moderation and Safety Gate** distilled from `VTXAI/vtx-jev-mod-multilingual` (`mmBERT-base` foundation) into a **256-dimensional static embedding architecture** with native **LF2 2-bit quantization**.It is designed for real-time abuse detection, vulgarity filtering, and toxicity screening across **100+ languages**, including Indian scripts (Hindi, Bengali, Tamil, Telugu, Marathi, Urdu) and international languages (Spanish, Russian, Arabic, French, German, Chinese, English).---### Highlights- ⚡ **Ultra-Low Latency**: Single text classification in **0.06 ms** (LF2 2-bit) to **0.28 ms** (FP32) on standard CPU.- 🚀 **High Throughput**: Processes over **41,000 queries per second** on CPU.- 🗜️ **2-Bit LF2 Quantization**:- Compresses from **124.9 MB down to 19.5 MB** in RAM and on disk (over **6.4x reduction**).- Uses native blockwise integer quantization (4 weights per `uint8` byte).- 🌐 **100+ Languages Coverage**: 256,000 multilingual vocabulary preserves full native words across all Indian and international scripts without fragmentation.- 📦 **Dual Framework Support**: Directly loadable via `SentenceTransformer`, `model2vec`, or the bundled `inference.py`.---### Quick Start: Content Moderation & Toxicity ScoringUsing native anchor vector matching:```pythonimport numpy as npfrom model2vec import StaticModel# Load model (requires only ~19.5 MB RAM in LF2 or ~125 MB in FP32)model = StaticModel.from_pretrained("VTXAI/VTX-MOD-1")def normalize(v):return v / (np.linalg.norm(v, axis=-1, keepdims=True) + 1e-9)# Pre-compute reference safe and toxic concept vectorssafe_anchor = "polite safe respectful helpful friendly conversation धन्यवाद शुक्रिया thank you"toxic_anchor = "offensive abuse toxic hate vulgar insult गाली बकवास হারামজাদা idiot stupid fool"anchors = normalize(model.encode([safe_anchor, toxic_anchor]))safe_vec, toxic_vec = anchors[0], anchors[1]def check_moderation(text: str) -> dict:v = normalize(model.encode([text])[0])sim_toxic = float(np.dot(v, toxic_vec))sim_safe = float(np.dot(v, safe_vec))prob_toxic = 1.0 / (1.0 + np.exp(-(sim_toxic - sim_safe) * 8.0))return {"text": text,"is_harmful": prob_toxic >= 0.5,"toxic_probability": round(prob_toxic, 4),}# Test casesprint(check_moderation("तू बिल्कुल बेवकूफ और बकवास इंसान है।"))# {'is_harmful': True, 'toxic_probability': 0.844}print(check_moderation("नमस्ते, क्या आप ट्रांसफॉर्मर मॉडल कैसे काम करता है समझा सकते हैं?"))# {'is_harmful': False, 'toxic_probability': 0.254}print(check_moderation("You are an absolute idiot and completely worthless."))# {'is_harmful': True, 'toxic_probability': 0.859}```---### Usage with Sentence Transformers```pythonfrom sentence_transformers import SentenceTransformermodel = SentenceTransformer("VTXAI/VTX-MOD-1")embeddings = model.encode(["This is a respectful message.","chup kar saale bhadwe pagal","வணக்கம் நண்பா"])print(embeddings.shape) # (3, 256)```---### Performance & Latency Benchmarks (CPU)| Benchmark | FP32 Static (`model.safetensors`) | LF2 2-Bit (`model_lf2.safetensors`) || :--- | :--- | :--- || **Model Size (RAM / Disk)** | 124.9 MB | **19.5 MB (6.4x compression)** || **Single Query Latency** | 0.28 ms | **0.06 ms** (60 microseconds) || **Batch Throughput (Batch=20)** | 8,637 queries/sec | **41,720 queries/sec** || **Multilingual Native Accuracy** | **88.9% – 100%** | **88.9% – 100%** |
README.md+89-20