lbourdois commited on
Commit
a329db4
·
verified ·
1 Parent(s): 33ce6e6

Update model card for Persian

Browse files
Files changed (1) hide show
  1. README.md +74 -60
README.md CHANGED
@@ -1,60 +1,74 @@
1
- ---
2
- pipeline_tag: sentence-similarity
3
- language: fas
4
- license: mit
5
- tags:
6
- - trimmed
7
- - sentence-transformers
8
- - feature-extraction
9
- - bidirectional_pplx_qwen3
10
- library_name: sentence-transformers
11
- base_model: perplexity-ai/pplx-embed-v1-0.6b
12
- base_model_relation: quantized
13
- datasets:
14
- - Lumberjackk/fineweb-2-trimming
15
- ---
16
-
17
- # pplx-embed-v1-fas-32768
18
-
19
- This model is a **20.47% smaller** version of [perplexity-ai/pplx-embed-v1-0.6b](https://huggingface.co/perplexity-ai/pplx-embed-v1-0.6b) optimized for Persian language via vocabulary size reduction using the [trimming](https://huggingface.co/blog/introduction-to-trimming) method.
20
-
21
- This trimmed model should perform similarly to the original model with only **32,768 tokens** and a much smaller memory footprint. However, it may not perform well for other languages as tokens not commonly used in Persian were removed from the vocabulary.
22
-
23
- ## Model Statistics
24
-
25
- | Metric | Original | Trimmed | Reduction |
26
- |--------|----------|---------|-----------|
27
- | **Vocabulary size** | 151,643 tokens | 32,768 tokens | **78.39%** |
28
- | **Model size** | 596,049,920 params | 474,021,888 params | **20.47%** |
29
-
30
- ## Mining Dataset Statistics
31
-
32
- - **Number of texts used for mining**: 200,000 texts
33
- - **Dataset**: [Lumberjackk/fineweb-2-trimming](https://huggingface.co/datasets/Lumberjackk/fineweb-2-trimming)
34
-
35
- ## Usage
36
-
37
- ```python
38
- from sentence_transformers import SentenceTransformer
39
-
40
- model = SentenceTransformer("alphaedge-ai/pplx-embed-v1-fas-32768", trust_remote_code=True)
41
- texts = [
42
- "Chunk 1",
43
- "Chunk 2",
44
- "Chunk 3",
45
- ]
46
- embeddings = model.encode(texts)
47
- print(embeddings.shape)
48
- ```
49
-
50
- ## Citation
51
-
52
- #### pplx-embed
53
-
54
- ```bibtex
55
- @article{pplxembed2025,
56
- title={pplx-embed: State-of-the-Art Embedding Models for Web-Scale Retrieval},
57
- author={Perplexity AI},
58
- year={2025}
59
- }
60
- ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ pipeline_tag: sentence-similarity
3
+ language: fas
4
+ license: mit
5
+ tags:
6
+ - trimmed
7
+ library_name: sentence-transformers
8
+ base_model: perplexity-ai/pplx-embed-v1-0.6b
9
+ base_model_relation: quantized
10
+ datasets:
11
+ - lbourdois/fineweb-2-trimming
12
+ ---
13
+
14
+ # pplx-embed-v1-fas-32768
15
+ This model is a **20.47% smaller** version of [perplexity-ai/pplx-embed-v1-0.6b](https://huggingface.co/perplexity-ai/pplx-embed-v1-0.6b) optimized for **Persian** language via vocabulary size reduction using the [trimming](https://huggingface.co/blog/lbourdois/introduction-to-trimming) method.
16
+ This trimmed model should perform similarly to the original model with only 32,768 tokens and a much smaller memory footprint. However, it may not perform well for other languages as tokens not commonly used in the selected languages were removed from the vocabulary.
17
+
18
+ ## Model Statistics
19
+ | Metric | Original | Trimmed | Reduction |
20
+ |--------|----------|---------|-----------|
21
+ | **Vocabulary size** | 151,936 tokens | 32,768 tokens | **78.43%** |
22
+ | **Model size** | 596,049,920 params | 474,021,888 params | **20.47%** |
23
+
24
+ ![image](https://raw.githubusercontent.com/lbourdois/blog/refs/heads/master/assets/images/Trimming/pplx-embed-v1-32768.png)
25
+
26
+ ## Mining Dataset Statistics
27
+ - **Number of texts used for mining**: 200,000 texts
28
+ - **Dataset**: [lbourdois/fineweb-2-trimming](https://huggingface.co/datasets/lbourdois/fineweb-2-trimming)
29
+
30
+ ## Usage
31
+
32
+ ```python
33
+ from sentence_transformers import SentenceTransformer
34
+ # Download from the 🤗 Hub
35
+ model = SentenceTransformer("alphaedge-ai/pplx-embed-v1-fas-32768")
36
+ # Run inference with queries and documents
37
+ query = "My query in Persian"
38
+ documents = [
39
+ "Chunk in Persian",
40
+ "Chunk in Persian",
41
+ "Chunk in Persian",
42
+ ]
43
+ query_embeddings = model.encode_query(query)
44
+ document_embeddings = model.encode_document(documents)
45
+ print(query_embeddings.shape, document_embeddings.shape)
46
+ # Compute similarities to determine a ranking
47
+ similarities = model.similarity(query_embeddings, document_embeddings)
48
+ print(similarities)
49
+ ```
50
+
51
+ ## Citations
52
+
53
+ #### pplx-embed-v1
54
+ ```
55
+ @misc{eslami2026diffusionpretraineddensecontextualembeddings,
56
+ title={Diffusion-Pretrained Dense and Contextual Embeddings},
57
+ author={Sedigheh Eslami and Maksim Gaiduk and Markus Krimmel and Louis Milliken and Bo Wang and Denis Bykov},
58
+ year={2026},
59
+ eprint={2602.11151},
60
+ archivePrefix={arXiv},
61
+ primaryClass={cs.LG},
62
+ url={https://arxiv.org/abs/2602.11151},
63
+ }
64
+ ```
65
+
66
+ #### Trimming blog post
67
+ ```
68
+ @misc{hf_blogpost_trimming,
69
+ title={Introduction to Trimming},
70
+ author={Loïck BOURDOIS and Tom AARSEN and Bram VANROY and Christopher AKIKI and Woojun JUNG and Manuel ROMERO and Prithiv SAKTHI},
71
+ year={2026},
72
+ url={https://huggingface.co/blog/lbourdois/introduction-to-trimming},
73
+ }
74
+ ```