Sentence Similarity
sentence-transformers
Safetensors
Transformers
ONNX
bert
feature-extraction
text-embeddings-inference
Instructions to use JayThinkDiff/CRE-0.5 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use JayThinkDiff/CRE-0.5 with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("JayThinkDiff/CRE-0.5") sentences = [ "That is a happy person", "That is a happy dog", "That is a very happy person", "Today is a sunny day" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Transformers
How to use JayThinkDiff/CRE-0.5 with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("JayThinkDiff/CRE-0.5") model = AutoModel.from_pretrained("JayThinkDiff/CRE-0.5", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -10,10 +10,16 @@ base_model:
|
|
| 10 |
- BAAI/bge-large-zh-v1.5
|
| 11 |
---
|
| 12 |
|
| 13 |
-
CRE
|
|
|
|
|
|
|
|
|
|
| 14 |
|
| 15 |
### Using Sentence-Transformers
|
| 16 |
```python
|
|
|
|
|
|
|
|
|
|
| 17 |
model = SentenceTransformer("JayThinkDiff/CRE-0.5")
|
| 18 |
|
| 19 |
query_embedding = model.encode("嵌入式")
|
|
@@ -23,10 +29,16 @@ passage_embedding = model.encode([
|
|
| 23 |
])
|
| 24 |
|
| 25 |
print("查询结果:", util.cos_sim(query_embedding, passage_embedding))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
```
|
| 27 |
|
| 28 |
<ul>注意事项:
|
| 29 |
<li>使用CLS Token来表征句子</li>
|
| 30 |
<li>最大输入Token长度为512</li>
|
|
|
|
| 31 |
</ul>
|
| 32 |
</small>
|
|
|
|
| 10 |
- BAAI/bge-large-zh-v1.5
|
| 11 |
---
|
| 12 |
|
| 13 |
+
CRE:A recruitment domain embedding Model. Used for encoding resume or job description texts, serving as the foundation for retrieval, RAG, and Agent. CRE:一个招聘领域的嵌入模型。用于对简历或岗位描述文本进行编码,作为检索、RAG(检索增强生成)和智能体(Agent)的基础。
|
| 14 |
+
2025/3/28 Released the CRE0.5.0 model and technical report. By means of CNN, a local feature-aware inductive bias is introduced to make local features more prominent in text encoding for human resource scenarios. Specifically, this is an auxiliary fine-tuning method. It improves the encoding quality of the base model by adding some model parameters for joint training during fine-tuning, and is essentially a projection layer. 借助CNN,以引入一种局部特征感知的归纳偏好,使在人力资源场景的文本编码中,局部特征更为突出。具体而言,这是一种在辅助微调的方法,通过在微调训练中增加一些模型参数共同训练,从而提高基座模型的编码质量,本质上是一种投影层设计。
|
| 15 |
+
|
| 16 |
+

|
| 17 |
|
| 18 |
### Using Sentence-Transformers
|
| 19 |
```python
|
| 20 |
+
from sentence_transformers import SentenceTransformer
|
| 21 |
+
from sentence_transformers import util
|
| 22 |
+
|
| 23 |
model = SentenceTransformer("JayThinkDiff/CRE-0.5")
|
| 24 |
|
| 25 |
query_embedding = model.encode("嵌入式")
|
|
|
|
| 29 |
])
|
| 30 |
|
| 31 |
print("查询结果:", util.cos_sim(query_embedding, passage_embedding))
|
| 32 |
+
|
| 33 |
+
"""
|
| 34 |
+
Expected Output:
|
| 35 |
+
查询结果: tensor([[0.3605, 0.4028]])
|
| 36 |
+
"""
|
| 37 |
```
|
| 38 |
|
| 39 |
<ul>注意事项:
|
| 40 |
<li>使用CLS Token来表征句子</li>
|
| 41 |
<li>最大输入Token长度为512</li>
|
| 42 |
+
<li>此方法已申请国家发明专利</li>
|
| 43 |
</ul>
|
| 44 |
</small>
|