Feature Extraction
sentence-transformers
Safetensors
English
code
roberta
python
javascript
go
java
ruby
php
code-search
code-embeddings
multilingual
matryoshka
unixcoder
mteb
Eval Results (legacy)
text-embeddings-inference
Instructions to use divakantpandey/code-embed-v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use divakantpandey/code-embed-v2 with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("divakantpandey/code-embed-v2") sentences = [ "The weather is lovely today.", "It's so sunny outside!", "He drove to the stadium." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] - Notebooks
- Google Colab
- Kaggle
Periodic checkpoint at step 250 (loss=0.00004)
Browse files- backbone/config.json +31 -0
- backbone/model.safetensors +3 -0
- backbone/tokenizer.json +0 -0
- backbone/tokenizer_config.json +17 -0
- code_embed_config.json +9 -0
- optimizer.pt +3 -0
- projection_head.pt +3 -0
- pycode_embed_config.json +9 -0
- rng_state.pt +3 -0
- scheduler.pt +3 -0
- sentence_transformers/1_Pooling/config.json +5 -0
- sentence_transformers/2_Dense/config.json +8 -0
- sentence_transformers/2_Dense/model.safetensors +3 -0
- sentence_transformers/3_Dense/config.json +8 -0
- sentence_transformers/3_Dense/model.safetensors +3 -0
- sentence_transformers/4_Normalize/config.json +4 -0
- sentence_transformers/README.md +154 -0
- sentence_transformers/config.json +31 -0
- sentence_transformers/config_sentence_transformers.json +14 -0
- sentence_transformers/model.safetensors +3 -0
- sentence_transformers/modules.json +32 -0
- sentence_transformers/sentence_bert_config.json +11 -0
- sentence_transformers/tokenizer.json +0 -0
- sentence_transformers/tokenizer_config.json +17 -0
- tokenizer.json +0 -0
- tokenizer_config.json +17 -0
- trainer_state.json +9 -0
backbone/config.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_cross_attention": false,
|
| 3 |
+
"architectures": [
|
| 4 |
+
"RobertaModel"
|
| 5 |
+
],
|
| 6 |
+
"attention_probs_dropout_prob": 0.1,
|
| 7 |
+
"bos_token_id": 0,
|
| 8 |
+
"classifier_dropout": null,
|
| 9 |
+
"dtype": "float32",
|
| 10 |
+
"eos_token_id": 2,
|
| 11 |
+
"gradient_checkpointing": false,
|
| 12 |
+
"hidden_act": "gelu",
|
| 13 |
+
"hidden_dropout_prob": 0.1,
|
| 14 |
+
"hidden_size": 768,
|
| 15 |
+
"initializer_range": 0.02,
|
| 16 |
+
"intermediate_size": 3072,
|
| 17 |
+
"is_decoder": false,
|
| 18 |
+
"layer_norm_eps": 1e-05,
|
| 19 |
+
"max_position_embeddings": 1026,
|
| 20 |
+
"model_type": "roberta",
|
| 21 |
+
"num_attention_heads": 12,
|
| 22 |
+
"num_hidden_layers": 12,
|
| 23 |
+
"output_past": true,
|
| 24 |
+
"pad_token_id": 1,
|
| 25 |
+
"position_embedding_type": "absolute",
|
| 26 |
+
"tie_word_embeddings": true,
|
| 27 |
+
"transformers_version": "5.20.1",
|
| 28 |
+
"type_vocab_size": 10,
|
| 29 |
+
"use_cache": true,
|
| 30 |
+
"vocab_size": 51416
|
| 31 |
+
}
|
backbone/model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0ebd5cd7e91212156f229c391f3af18779720266fa9592a5366e9b24a49aea13
|
| 3 |
+
size 503741296
|
backbone/tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
backbone/tokenizer_config.json
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_prefix_space": false,
|
| 3 |
+
"backend": "tokenizers",
|
| 4 |
+
"bos_token": "<s>",
|
| 5 |
+
"cls_token": "<s>",
|
| 6 |
+
"eos_token": "</s>",
|
| 7 |
+
"errors": "replace",
|
| 8 |
+
"is_local": false,
|
| 9 |
+
"local_files_only": false,
|
| 10 |
+
"mask_token": "<mask>",
|
| 11 |
+
"model_max_length": 1024,
|
| 12 |
+
"pad_token": "<pad>",
|
| 13 |
+
"sep_token": "</s>",
|
| 14 |
+
"tokenizer_class": "RobertaTokenizer",
|
| 15 |
+
"trim_offsets": true,
|
| 16 |
+
"unk_token": "<unk>"
|
| 17 |
+
}
|
code_embed_config.json
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"base_model_name_or_path": "microsoft/unixcoder-base",
|
| 3 |
+
"backbone_hidden_size": 768,
|
| 4 |
+
"embedding_dim": 1536,
|
| 5 |
+
"projection_hidden_dim": 1536,
|
| 6 |
+
"pooling": "mean",
|
| 7 |
+
"max_seq_length": 1024,
|
| 8 |
+
"dropout": 0.1
|
| 9 |
+
}
|
optimizer.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:48fa8042d2e60c4db760026c1da0e01df46faf5b99a463c05ce14a59f400c3dd
|
| 3 |
+
size 1031217338
|
projection_head.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:863d5a7185dd4c86f0e5ee6f440a2e4f12400cc0001cec8b079004ceb0135bdb
|
| 3 |
+
size 14170320
|
pycode_embed_config.json
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"base_model_name_or_path": "microsoft/unixcoder-base",
|
| 3 |
+
"backbone_hidden_size": 768,
|
| 4 |
+
"embedding_dim": 1536,
|
| 5 |
+
"projection_hidden_dim": 1536,
|
| 6 |
+
"pooling": "mean",
|
| 7 |
+
"max_seq_length": 1024,
|
| 8 |
+
"dropout": 0.1
|
| 9 |
+
}
|
rng_state.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:47b4928cd7ee30852ac66cf551b18d9e59d60c45fc21cf2ddf3c36d50e2e1f5f
|
| 3 |
+
size 14244
|
scheduler.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f0a42ac0ebdafd07ca4427102b72c87fd07dfa02a1a4517c07497b9f3e334935
|
| 3 |
+
size 1064
|
sentence_transformers/1_Pooling/config.json
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"embedding_dimension": 768,
|
| 3 |
+
"pooling_mode": "mean",
|
| 4 |
+
"include_prompt": true
|
| 5 |
+
}
|
sentence_transformers/2_Dense/config.json
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"in_features": 768,
|
| 3 |
+
"out_features": 1536,
|
| 4 |
+
"bias": true,
|
| 5 |
+
"activation_function": "torch.nn.modules.activation.GELU",
|
| 6 |
+
"module_input_name": "sentence_embedding",
|
| 7 |
+
"module_output_name": "sentence_embedding"
|
| 8 |
+
}
|
sentence_transformers/2_Dense/model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7f5a673cc4a68ee6d87cc8bd0d78abba471d3d1095848596824db7f01a83ef94
|
| 3 |
+
size 4724896
|
sentence_transformers/3_Dense/config.json
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"in_features": 1536,
|
| 3 |
+
"out_features": 1536,
|
| 4 |
+
"bias": true,
|
| 5 |
+
"activation_function": "torch.nn.modules.linear.Identity",
|
| 6 |
+
"module_input_name": "sentence_embedding",
|
| 7 |
+
"module_output_name": "sentence_embedding"
|
| 8 |
+
}
|
sentence_transformers/3_Dense/model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b9fa7beca52eaa2963fd237551acd314232b1b30383e481d960d05750734c8d3
|
| 3 |
+
size 9443488
|
sentence_transformers/4_Normalize/config.json
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"module_input_name": "sentence_embedding",
|
| 3 |
+
"module_output_name": "sentence_embedding"
|
| 4 |
+
}
|
sentence_transformers/README.md
ADDED
|
@@ -0,0 +1,154 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
tags:
|
| 3 |
+
- sentence-transformers
|
| 4 |
+
- sentence-similarity
|
| 5 |
+
- feature-extraction
|
| 6 |
+
- dense
|
| 7 |
+
base_model: microsoft/unixcoder-base
|
| 8 |
+
pipeline_tag: sentence-similarity
|
| 9 |
+
library_name: sentence-transformers
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+
# SentenceTransformer based on microsoft/unixcoder-base
|
| 13 |
+
|
| 14 |
+
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [microsoft/unixcoder-base](https://huggingface.co/microsoft/unixcoder-base). It maps inputs to a 1536-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, classification, clustering, and more.
|
| 15 |
+
|
| 16 |
+
## Model Details
|
| 17 |
+
|
| 18 |
+
### Model Description
|
| 19 |
+
- **Model Type:** Sentence Transformer
|
| 20 |
+
- **Base model:** [microsoft/unixcoder-base](https://huggingface.co/microsoft/unixcoder-base) <!-- at revision 5604afdc964f6c53782a6813140ade5216b99006 -->
|
| 21 |
+
- **Maximum Sequence Length:** 1024 tokens
|
| 22 |
+
- **Output Dimensionality:** 1536 dimensions
|
| 23 |
+
- **Similarity Function:** Cosine Similarity
|
| 24 |
+
- **Supported Modality:** Text
|
| 25 |
+
<!-- - **Training Dataset:** Unknown -->
|
| 26 |
+
<!-- - **Language:** Unknown -->
|
| 27 |
+
<!-- - **License:** Unknown -->
|
| 28 |
+
|
| 29 |
+
### Model Sources
|
| 30 |
+
|
| 31 |
+
- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
|
| 32 |
+
- **Repository:** [Sentence Transformers on GitHub](https://github.com/huggingface/sentence-transformers)
|
| 33 |
+
- **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
|
| 34 |
+
|
| 35 |
+
### Full Model Architecture
|
| 36 |
+
|
| 37 |
+
```
|
| 38 |
+
SentenceTransformer(
|
| 39 |
+
(0): Transformer({'transformer_task': 'feature-extraction', 'modality_config': {'text': {'method': 'forward', 'method_output_name': 'last_hidden_state'}}, 'module_output_name': 'token_embeddings', 'architecture': 'RobertaModel'})
|
| 40 |
+
(1): Pooling({'embedding_dimension': 768, 'pooling_mode': 'mean', 'include_prompt': True})
|
| 41 |
+
(2): Dense({'in_features': 768, 'out_features': 1536, 'bias': True, 'activation_function': 'torch.nn.modules.activation.GELU', 'module_input_name': 'sentence_embedding', 'module_output_name': 'sentence_embedding'})
|
| 42 |
+
(3): Dense({'in_features': 1536, 'out_features': 1536, 'bias': True, 'activation_function': 'torch.nn.modules.linear.Identity', 'module_input_name': 'sentence_embedding', 'module_output_name': 'sentence_embedding'})
|
| 43 |
+
(4): Normalize({'module_input_name': 'sentence_embedding', 'module_output_name': 'sentence_embedding'})
|
| 44 |
+
)
|
| 45 |
+
```
|
| 46 |
+
|
| 47 |
+
## Usage
|
| 48 |
+
|
| 49 |
+
### Direct Usage (Sentence Transformers)
|
| 50 |
+
|
| 51 |
+
First install the Sentence Transformers library:
|
| 52 |
+
|
| 53 |
+
```bash
|
| 54 |
+
pip install -U sentence-transformers
|
| 55 |
+
```
|
| 56 |
+
Then you can load this model and run inference.
|
| 57 |
+
```python
|
| 58 |
+
from sentence_transformers import SentenceTransformer
|
| 59 |
+
|
| 60 |
+
# Download from the 🤗 Hub
|
| 61 |
+
model = SentenceTransformer("sentence_transformers_model_id")
|
| 62 |
+
# Run inference
|
| 63 |
+
sentences = [
|
| 64 |
+
'The weather is lovely today.',
|
| 65 |
+
"It's so sunny outside!",
|
| 66 |
+
'He drove to the stadium.',
|
| 67 |
+
]
|
| 68 |
+
embeddings = model.encode(sentences)
|
| 69 |
+
print(embeddings.shape)
|
| 70 |
+
# [3, 1536]
|
| 71 |
+
|
| 72 |
+
# Get the similarity scores for the embeddings
|
| 73 |
+
similarities = model.similarity(embeddings, embeddings)
|
| 74 |
+
print(similarities)
|
| 75 |
+
# tensor([[1.0000, 0.4488, 0.3237],
|
| 76 |
+
# [0.4488, 1.0000, 0.3997],
|
| 77 |
+
# [0.3237, 0.3997, 1.0000]])
|
| 78 |
+
```
|
| 79 |
+
<!--
|
| 80 |
+
### Direct Usage (Transformers)
|
| 81 |
+
|
| 82 |
+
<details><summary>Click to see the direct usage in Transformers</summary>
|
| 83 |
+
|
| 84 |
+
</details>
|
| 85 |
+
-->
|
| 86 |
+
|
| 87 |
+
<!--
|
| 88 |
+
### Downstream Usage (Sentence Transformers)
|
| 89 |
+
|
| 90 |
+
You can finetune this model on your own dataset.
|
| 91 |
+
|
| 92 |
+
<details><summary>Click to expand</summary>
|
| 93 |
+
|
| 94 |
+
</details>
|
| 95 |
+
-->
|
| 96 |
+
|
| 97 |
+
<!--
|
| 98 |
+
### Out-of-Scope Use
|
| 99 |
+
|
| 100 |
+
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
| 101 |
+
-->
|
| 102 |
+
|
| 103 |
+
<!--
|
| 104 |
+
## Bias, Risks and Limitations
|
| 105 |
+
|
| 106 |
+
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
| 107 |
+
-->
|
| 108 |
+
|
| 109 |
+
<!--
|
| 110 |
+
### Recommendations
|
| 111 |
+
|
| 112 |
+
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
|
| 113 |
+
-->
|
| 114 |
+
|
| 115 |
+
## Training Details
|
| 116 |
+
|
| 117 |
+
### Framework Versions
|
| 118 |
+
- Python: 3.11.10
|
| 119 |
+
- Sentence Transformers: 6.1.0
|
| 120 |
+
- Transformers: 5.20.1
|
| 121 |
+
- PyTorch: 2.6.0+cu124
|
| 122 |
+
- Accelerate: 1.15.0
|
| 123 |
+
- Datasets: 5.1.0
|
| 124 |
+
- Tokenizers: 0.23.3
|
| 125 |
+
|
| 126 |
+
## Additional Resources
|
| 127 |
+
|
| 128 |
+
- [Training and Finetuning Embedding Models with Sentence Transformers](https://huggingface.co/blog/train-sentence-transformers): the end-to-end guide for training or finetuning Sentence Transformer models.
|
| 129 |
+
- [Introduction to Matryoshka Embedding Models](https://huggingface.co/blog/matryoshka): variable-size embeddings that can be truncated with minimal quality loss.
|
| 130 |
+
- [Binary and Scalar Embedding Quantization for Significantly Faster & Cheaper Retrieval](https://huggingface.co/blog/embedding-quantization): post-training compression of embedding vectors.
|
| 131 |
+
- [Multimodal Embedding & Reranker Models with Sentence Transformers](https://huggingface.co/blog/multimodal-sentence-transformers): use text, image, audio, and video models through the same API.
|
| 132 |
+
- [Training and Finetuning Multimodal Embedding & Reranker Models with Sentence Transformers](https://huggingface.co/blog/train-multimodal-sentence-transformers): train multimodal embedding models, with a Visual Document Retrieval walkthrough.
|
| 133 |
+
|
| 134 |
+
## Citation
|
| 135 |
+
|
| 136 |
+
### BibTeX
|
| 137 |
+
|
| 138 |
+
<!--
|
| 139 |
+
## Glossary
|
| 140 |
+
|
| 141 |
+
*Clearly define terms in order to be accessible across audiences.*
|
| 142 |
+
-->
|
| 143 |
+
|
| 144 |
+
<!--
|
| 145 |
+
## Model Card Authors
|
| 146 |
+
|
| 147 |
+
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
|
| 148 |
+
-->
|
| 149 |
+
|
| 150 |
+
<!--
|
| 151 |
+
## Model Card Contact
|
| 152 |
+
|
| 153 |
+
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
|
| 154 |
+
-->
|
sentence_transformers/config.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_cross_attention": false,
|
| 3 |
+
"architectures": [
|
| 4 |
+
"RobertaModel"
|
| 5 |
+
],
|
| 6 |
+
"attention_probs_dropout_prob": 0.1,
|
| 7 |
+
"bos_token_id": 0,
|
| 8 |
+
"classifier_dropout": null,
|
| 9 |
+
"dtype": "float32",
|
| 10 |
+
"eos_token_id": 2,
|
| 11 |
+
"gradient_checkpointing": false,
|
| 12 |
+
"hidden_act": "gelu",
|
| 13 |
+
"hidden_dropout_prob": 0.1,
|
| 14 |
+
"hidden_size": 768,
|
| 15 |
+
"initializer_range": 0.02,
|
| 16 |
+
"intermediate_size": 3072,
|
| 17 |
+
"is_decoder": false,
|
| 18 |
+
"layer_norm_eps": 1e-05,
|
| 19 |
+
"max_position_embeddings": 1026,
|
| 20 |
+
"model_type": "roberta",
|
| 21 |
+
"num_attention_heads": 12,
|
| 22 |
+
"num_hidden_layers": 12,
|
| 23 |
+
"output_past": true,
|
| 24 |
+
"pad_token_id": 1,
|
| 25 |
+
"position_embedding_type": "absolute",
|
| 26 |
+
"tie_word_embeddings": true,
|
| 27 |
+
"transformers_version": "5.20.1",
|
| 28 |
+
"type_vocab_size": 10,
|
| 29 |
+
"use_cache": true,
|
| 30 |
+
"vocab_size": 51416
|
| 31 |
+
}
|
sentence_transformers/config_sentence_transformers.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"__version__": {
|
| 3 |
+
"pytorch": "2.6.0+cu124",
|
| 4 |
+
"sentence_transformers": "6.1.0",
|
| 5 |
+
"transformers": "5.20.1"
|
| 6 |
+
},
|
| 7 |
+
"default_prompt_name": null,
|
| 8 |
+
"model_type": "SentenceTransformer",
|
| 9 |
+
"prompts": {
|
| 10 |
+
"document": "",
|
| 11 |
+
"query": ""
|
| 12 |
+
},
|
| 13 |
+
"similarity_fn_name": "cosine"
|
| 14 |
+
}
|
sentence_transformers/model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0ebd5cd7e91212156f229c391f3af18779720266fa9592a5366e9b24a49aea13
|
| 3 |
+
size 503741296
|
sentence_transformers/modules.json
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"idx": 0,
|
| 4 |
+
"name": "0",
|
| 5 |
+
"path": "",
|
| 6 |
+
"type": "sentence_transformers.base.modules.transformer.Transformer"
|
| 7 |
+
},
|
| 8 |
+
{
|
| 9 |
+
"idx": 1,
|
| 10 |
+
"name": "1",
|
| 11 |
+
"path": "1_Pooling",
|
| 12 |
+
"type": "sentence_transformers.sentence_transformer.modules.pooling.Pooling"
|
| 13 |
+
},
|
| 14 |
+
{
|
| 15 |
+
"idx": 2,
|
| 16 |
+
"name": "2",
|
| 17 |
+
"path": "2_Dense",
|
| 18 |
+
"type": "sentence_transformers.base.modules.dense.Dense"
|
| 19 |
+
},
|
| 20 |
+
{
|
| 21 |
+
"idx": 3,
|
| 22 |
+
"name": "3",
|
| 23 |
+
"path": "3_Dense",
|
| 24 |
+
"type": "sentence_transformers.base.modules.dense.Dense"
|
| 25 |
+
},
|
| 26 |
+
{
|
| 27 |
+
"idx": 4,
|
| 28 |
+
"name": "4",
|
| 29 |
+
"path": "4_Normalize",
|
| 30 |
+
"type": "sentence_transformers.base.modules.normalize.Normalize"
|
| 31 |
+
}
|
| 32 |
+
]
|
sentence_transformers/sentence_bert_config.json
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"transformer_task": "feature-extraction",
|
| 3 |
+
"modality_config": {
|
| 4 |
+
"text": {
|
| 5 |
+
"method": "forward",
|
| 6 |
+
"method_output_name": "last_hidden_state"
|
| 7 |
+
}
|
| 8 |
+
},
|
| 9 |
+
"module_output_name": "token_embeddings",
|
| 10 |
+
"max_seq_length": 1024
|
| 11 |
+
}
|
sentence_transformers/tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
sentence_transformers/tokenizer_config.json
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_prefix_space": false,
|
| 3 |
+
"backend": "tokenizers",
|
| 4 |
+
"bos_token": "<s>",
|
| 5 |
+
"cls_token": "<s>",
|
| 6 |
+
"eos_token": "</s>",
|
| 7 |
+
"errors": "replace",
|
| 8 |
+
"is_local": false,
|
| 9 |
+
"local_files_only": false,
|
| 10 |
+
"mask_token": "<mask>",
|
| 11 |
+
"model_max_length": 1024,
|
| 12 |
+
"pad_token": "<pad>",
|
| 13 |
+
"sep_token": "</s>",
|
| 14 |
+
"tokenizer_class": "RobertaTokenizer",
|
| 15 |
+
"trim_offsets": true,
|
| 16 |
+
"unk_token": "<unk>"
|
| 17 |
+
}
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_prefix_space": false,
|
| 3 |
+
"backend": "tokenizers",
|
| 4 |
+
"bos_token": "<s>",
|
| 5 |
+
"cls_token": "<s>",
|
| 6 |
+
"eos_token": "</s>",
|
| 7 |
+
"errors": "replace",
|
| 8 |
+
"is_local": false,
|
| 9 |
+
"local_files_only": false,
|
| 10 |
+
"mask_token": "<mask>",
|
| 11 |
+
"model_max_length": 1024,
|
| 12 |
+
"pad_token": "<pad>",
|
| 13 |
+
"sep_token": "</s>",
|
| 14 |
+
"tokenizer_class": "RobertaTokenizer",
|
| 15 |
+
"trim_offsets": true,
|
| 16 |
+
"unk_token": "<unk>"
|
| 17 |
+
}
|
trainer_state.json
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"global_step": 250,
|
| 3 |
+
"current_epoch": 0,
|
| 4 |
+
"total_training_steps": 6314,
|
| 5 |
+
"learning_rate": 1.1885895404120445e-05,
|
| 6 |
+
"scheduler_name": "cosine",
|
| 7 |
+
"fp16": false,
|
| 8 |
+
"bf16": true
|
| 9 |
+
}
|