Instructions to use LingoIITGN/FlowVec-v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use LingoIITGN/FlowVec-v2 with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("LingoIITGN/FlowVec-v2") 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] - Notebooks
- Google Colab
- Kaggle
FlowVec-v2
FlowVec-v2 is an 8-billion-parameter text-embedding model for Indian languages developed by Lingo Labs at IIT GN. It maps text in 21 Indic languages, across Bengali, Devanagari, Gujarati, Gurmukhi, Kannada, Malayalam, Odia, Tamil, Telugu, Perso-Arabic and Ol Chiki scripts, to 4096-dimensional vectors for retrieval, reranking, classification, clustering, bitext mining, semantic similarity and NLI.
Each task type comes with its own instruction, so one model serves search, cross-lingual matching and labelling without fine-tuning.
MTEB(Indic, v1) results
Scores from our own evaluation (two identical runs).
| Task | FlowVec-v1 | FlowVec-v2 | ฮ |
|---|---|---|---|
| BelebeleRetrieval | 90.39 | 90.49 | +0.10 |
| BengaliSentimentAnalysis | 92.0 | 92.06 | +0.06 |
| GujaratiNewsClassification | 91.23 | 91.53 | +0.30 |
| HindiDiscourseClassification | 43.59 | 43.85 | +0.26 |
| IN22ConvBitextMining | 66.92 | 72.13 | +5.21 |
| IN22GenBitextMining | 88.41 | 89.62 | +1.21 |
| IndicCrosslingualSTS | 61.42 | 62.06 | +0.64 |
| MTOPIntentClassification | 84.65 | 84.75 | +0.10 |
| MalayalamNewsClassification | 91.8 | 92.75 | +0.95 |
| MultiHateClassification | 67.38 | 67.19 | -0.19 |
| NepaliNewsClassification | 97.01 | 97.01 | +0.00 |
| PunjabiNewsClassification | 84.2 | 84.46 | +0.26 |
| SIB200ClusteringS2S | 87.25 | 87.41 | +0.16 |
| SanskritShlokasClassification | 64.9 | 71.46 | +6.56 |
| SentimentAnalysisHindi | 76.02 | 76.23 | +0.21 |
| TweetSentimentClassification | 46.56 | 46.91 | +0.35 |
| UrduRomanSentimentClassification | 61.99 | 64.01 | +2.02 |
| WikipediaRerankingMultilingual | 87.98 | 88.88 | +0.90 |
| XNLI | 82.11 | 82.13 | +0.02 |
| XQuADRetrieval | 94.35 | 94.36 | +0.01 |
| mean | 78.01 | 78.96 |
Usage
from sentence_transformers import SentenceTransformer
import torch
model = SentenceTransformer("LingoIITGN/FlowVec-v2", model_kwargs={"torch_dtype": torch.bfloat16})
queries = model.encode(["เคญเคพเคฐเคค เคเฅ เคฐเคพเคเคงเคพเคจเฅ เคเฅเคฏเคพ เคนเฅ?"], prompt_name="XQuADRetrieval-query")
docs = model.encode(["เคจเค เคฆเคฟเคฒเฅเคฒเฅ เคญเคพเคฐเคค เคเฅ เคฐเคพเคเคงเคพเคจเฅ เคนเฅเฅค"])
print(model.similarity(queries, docs))
model.prompts lists every task instruction. For your own tasks, pass
prompt="Instruct: <your task>\nQuery: ".
- Downloads last month
- 31