Sentence Similarity
Transformers
Safetensors
sentence-transformers
Chinese
utu
feature-extraction
text-embeddings-inference
custom_code
Instructions to use tencent/Youtu-Embedding with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tencent/Youtu-Embedding with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("tencent/Youtu-Embedding", trust_remote_code=True, device_map="auto") - sentence-transformers
How to use tencent/Youtu-Embedding with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("tencent/Youtu-Embedding", trust_remote_code=True) sentences = [ "那是 個快樂的人", "那是 條快樂的狗", "那是 個非常幸福的人", "今天是晴天" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Notebooks
- Google Colab
- Kaggle
springxchen commited on
Update config.json
Browse files- config.json +3 -3
config.json
CHANGED
|
@@ -5,9 +5,9 @@
|
|
| 5 |
"attention_bias": false,
|
| 6 |
"attention_dropout": 0.0,
|
| 7 |
"auto_map": {
|
| 8 |
-
"AutoConfig": "
|
| 9 |
-
"AutoModel": "
|
| 10 |
-
"AutoModelForCausalLM": "
|
| 11 |
},
|
| 12 |
"bos_token_id": 128000,
|
| 13 |
"embedding_initializer_range": 0.02795084971874737,
|
|
|
|
| 5 |
"attention_bias": false,
|
| 6 |
"attention_dropout": 0.0,
|
| 7 |
"auto_map": {
|
| 8 |
+
"AutoConfig": "configuration_youtu.UTUConfig",
|
| 9 |
+
"AutoModel": "modeling_youtu.UTUModel",
|
| 10 |
+
"AutoModelForCausalLM": "modeling_youtu.UTUForCausalLM"
|
| 11 |
},
|
| 12 |
"bos_token_id": 128000,
|
| 13 |
"embedding_initializer_range": 0.02795084971874737,
|