lbourdois commited on
Commit
053b636
·
verified ·
1 Parent(s): 8abc018

Update model card for Kurdish

Browse files
Files changed (1) hide show
  1. README.md +73 -69
README.md CHANGED
@@ -1,69 +1,73 @@
1
- ---
2
- pipeline_tag: sentence-similarity
3
- language: kur
4
- license: mit
5
- tags:
6
- - trimmed
7
- library_name: sentence-transformers
8
- base_model: BAAI/bge-m3
9
- base_model_relation: quantized
10
- datasets:
11
- - Lumberjackk/fineweb-2-trimming
12
- ---
13
-
14
- # bge-m3-kur-32768
15
-
16
- This model is a **39.18% smaller** version of [BAAI/bge-m3](https://huggingface.co/BAAI/bge-m3) optimized for Kurdish language via vocabulary size reduction using the [trimming](https://huggingface.co/blog/introduction-to-trimming) method.
17
-
18
- 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 Kurdish were removed from the vocabulary.
19
-
20
- ## Model Statistics
21
-
22
- | Metric | Original | Trimmed | Reduction |
23
- |--------|----------|---------|-----------|
24
- | **Vocabulary size** | 250,002 tokens | 32,768 tokens | **86.89%** |
25
- | **Model size** | 567,754,752 params | 345,307,136 params | **39.18%** |
26
-
27
-
28
- ## Mining Dataset Statistics
29
-
30
- - **Number of texts used for mining**: 200,000 texts
31
- - **Dataset**: [Lumberjackk/fineweb-2-trimming](https://huggingface.co/datasets/Lumberjackk/fineweb-2-trimming)
32
-
33
- ![image](https://cdn-uploads.huggingface.co/production/uploads/613b0a62a14099d5afed7830/7UlOxvIMVUm--Wexm9yyz.png)
34
-
35
- ## Usage
36
-
37
- ```python
38
- from sentence_transformers import SentenceTransformer
39
- # Download from the 🤗 Hub
40
- model = SentenceTransformer("lbourdois/bge-m3-kur-32768")
41
- # Run inference with queries and documents
42
- query = "My query"
43
- documents = [
44
- "Chunk 1",
45
- "Chunk 2",
46
- "Chunk 3",
47
- ]
48
- query_embeddings = model.encode_query(query)
49
- document_embeddings = model.encode_document(documents)
50
- print(query_embeddings.shape, document_embeddings.shape)
51
- # Compute similarities to determine a ranking
52
- similarities = model.similarity(query_embeddings, document_embeddings)
53
- print(similarities)
54
- ```
55
-
56
- ## Citation
57
-
58
- #### BGE M3-Embedding
59
-
60
- ```bibtex
61
- @misc{bge-m3,
62
- title={BGE M3-Embedding: Multi-Lingual, Multi-Functionality, Multi-Granularity Text Embeddings Through Self-Knowledge Distillation},
63
- author={Jianlv Chen and Shitao Xiao and Peitian Zhang and Kun Luo and Defu Lian and Zheng Liu},
64
- year={2024},
65
- eprint={2402.03216},
66
- archivePrefix={arXiv},
67
- primaryClass={cs.CL}
68
- }
69
- ```
 
 
 
 
 
1
+ ---
2
+ pipeline_tag: sentence-similarity
3
+ language: kur
4
+ license: mit
5
+ tags:
6
+ - trimmed
7
+ library_name: sentence-transformers
8
+ base_model: BAAI/bge-m3
9
+ base_model_relation: quantized
10
+ datasets:
11
+ - lbourdois/fineweb-2-trimming
12
+ ---
13
+
14
+ # bge-m3-kur-32768
15
+ This model is a **39.18% smaller** version of [BAAI/bge-m3](https://huggingface.co/BAAI/bge-m3) optimized for Kurdish 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** | 250,002 tokens | 32,768 tokens | **86.89%** |
22
+ | **Model size** | 567,754,752 params | 345,307,136 params | **39.18%** |
23
+
24
+ ![image](https://raw.githubusercontent.com/lbourdois/blog/refs/heads/master/assets/images/Trimming/bge-m3-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/bge-m3-kur-32768")
36
+ # Run inference with queries and documents
37
+ query = "My query in Kurdish"
38
+ documents = [
39
+ "Chunk in Kurdish",
40
+ "Chunk in Kurdish",
41
+ "Chunk in Kurdish",
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
+ #### BGE-M3
54
+ ```
55
+ @misc{bge-m3,
56
+ title={BGE M3-Embedding: Multi-Lingual, Multi-Functionality, Multi-Granularity Text Embeddings Through Self-Knowledge Distillation},
57
+ author={Jianlv Chen and Shitao Xiao and Peitian Zhang and Kun Luo and Defu Lian and Zheng Liu},
58
+ year={2024},
59
+ eprint={2402.03216},
60
+ archivePrefix={arXiv},
61
+ primaryClass={cs.CL}
62
+ }
63
+ ```
64
+
65
+ #### Trimming blog post
66
+ ```
67
+ @misc{hf_blogpost_trimming,
68
+ title={Introduction to Trimming},
69
+ author={Loïck BOURDOIS and Tom AARSEN and Bram VANROY and Christopher AKIKI and Woojun JUNG and Manuel ROMERO and Prithiv SAKTHI},
70
+ year={2026},
71
+ url={https://huggingface.co/blog/lbourdois/introduction-to-trimming},
72
+ }
73
+ ```