lbourdois commited on
Commit
86352ae
·
verified ·
1 Parent(s): 98fc179

Update model card for Swedish

Browse files
Files changed (1) hide show
  1. README.md +71 -66
README.md CHANGED
@@ -1,66 +1,71 @@
1
- ---
2
- pipeline_tag: sentence-similarity
3
- language: swe
4
- license: apache-2.0
5
- tags:
6
- - trimmed
7
- library_name: sentence-transformers
8
- base_model: Qwen/Qwen3-Embedding-0.6B
9
- base_model_relation: quantized
10
- datasets:
11
- - Lumberjackk/fineweb-2-trimming
12
- ---
13
-
14
- # Qwen3-Embedding-swe-16384
15
-
16
- This model is a **23.25% smaller** version of [Qwen/Qwen3-Embedding-0.6B](https://huggingface.co/Qwen/Qwen3-Embedding-0.6B) optimized for Swedish 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 **16,384 tokens** and a much smaller memory footprint. However, it may not perform well for other languages as tokens not commonly used in Swedish were removed from the vocabulary.
19
-
20
- ## Model Statistics
21
-
22
- | Metric | Original | Trimmed | Reduction |
23
- |--------|----------|---------|-----------|
24
- | **Vocabulary size** | 151,643 tokens | 16,384 tokens | **89.20%** |
25
- | **Model size** | 595,776,512 params | 457,244,672 params | **23.25%** |
26
-
27
- ![image](https://cdn-uploads.huggingface.co/production/uploads/613b0a62a14099d5afed7830/xyTFk3gLOL-4MQZSfKCgt.png)
28
-
29
- ## Mining Dataset Statistics
30
-
31
- - **Number of texts used for mining**: 200,000 texts
32
- - **Dataset**: [Lumberjackk/fineweb-2-trimming](https://huggingface.co/datasets/Lumberjackk/fineweb-2-trimming)
33
-
34
- ## Usage
35
-
36
- ```python
37
- from sentence_transformers import SentenceTransformer
38
- # Download from the 🤗 Hub
39
- model = SentenceTransformer("lbourdois/Qwen3-Embedding-swe-16384")
40
- # Run inference with queries and documents
41
- query = "My query"
42
- documents = [
43
- "Chunk 1",
44
- "Chunk 2",
45
- "Chunk 3",
46
- ]
47
- query_embeddings = model.encode_query(query)
48
- document_embeddings = model.encode_document(documents)
49
- print(query_embeddings.shape, document_embeddings.shape)
50
- # Compute similarities to determine a ranking
51
- similarities = model.similarity(query_embeddings, document_embeddings)
52
- print(similarities)
53
- ```
54
-
55
- ## Citation
56
-
57
- #### Qwen3 Embedding
58
-
59
- ```bibtex
60
- @article{qwen3embedding,
61
- title={Qwen3 Embedding: Advancing Text Embedding and Reranking Through Foundation Models},
62
- author={Zhang, Yanzhao and Li, Mingxin and Long, Dingkun and Zhang, Xin and Lin, Huan and Yang, Baosong and Xie, Pengjun and Yang, An and Liu, Dayiheng and Lin, Junyang and Huang, Fei and Zhou, Jingren},
63
- journal={arXiv preprint arXiv:2506.05176},
64
- year={2025}
65
- }
66
- ```
 
 
 
 
 
 
1
+ ---
2
+ pipeline_tag: sentence-similarity
3
+ language: swe
4
+ license: apache-2.0
5
+ tags:
6
+ - trimmed
7
+ library_name: sentence-transformers
8
+ base_model: Qwen/Qwen3-Embedding-0.6B
9
+ base_model_relation: quantized
10
+ datasets:
11
+ - lbourdois/fineweb-2-trimming
12
+ ---
13
+
14
+ # Qwen3-Embedding-swe-16384
15
+ This model is a **23.25% smaller** version of [Qwen/Qwen3-Embedding-0.6B](https://huggingface.co/Qwen/Qwen3-Embedding-0.6B) optimized for **Swedish** 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 16,384 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,669 tokens | 16,384 tokens | **89.20%** |
22
+ | **Model size** | 595,776,512 params | 457,244,672 params | **23.25%** |
23
+
24
+ ![image](https://raw.githubusercontent.com/lbourdois/blog/refs/heads/master/assets/images/Trimming/Qwen3-Embedding-16384.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/Qwen3-Embedding-swe-16384")
36
+ # Run inference with queries and documents
37
+ query = "My query in Swedish"
38
+ documents = [
39
+ "Chunk in Swedish",
40
+ "Chunk in Swedish",
41
+ "Chunk in Swedish",
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
+ #### Qwen3 Embedding
54
+ ```
55
+ @article{qwen3embedding,
56
+ title={Qwen3 Embedding: Advancing Text Embedding and Reranking Through Foundation Models},
57
+ author={Zhang, Yanzhao and Li, Mingxin and Long, Dingkun and Zhang, Xin and Lin, Huan and Yang, Baosong and Xie, Pengjun and Yang, An and Liu, Dayiheng and Lin, Junyang and Huang, Fei and Zhou, Jingren},
58
+ journal={arXiv preprint arXiv:2506.05176},
59
+ year={2025}
60
+ }
61
+ ```
62
+
63
+ #### Trimming blog post
64
+ ```
65
+ @misc{hf_blogpost_trimming,
66
+ title={Introduction to Trimming},
67
+ author={Loïck BOURDOIS and Tom AARSEN and Bram VANROY and Christopher AKIKI and Woojun JUNG and Manuel ROMERO and Prithiv SAKTHI},
68
+ year={2026},
69
+ url={https://huggingface.co/blog/lbourdois/introduction-to-trimming},
70
+ }
71
+ ```
Free AI Image Generator No sign-up. Instant results. Open Now