🚀 nomic-ai/nomic-embed-text-v1.5
This model is a Sentence Transformer finetuned from nomic-ai/nomic-embed-text-v1.5 on the sci_topic_triplets dataset. It maps sentences and paragraphs to a 768 - dimensional dense vector space. This enables a wide range of applications, including semantic textual similarity, semantic search, paraphrase mining, text classification, and clustering.
✨ Features
- Maps sentences and paragraphs to a 768 - dimensional dense vector space.
- Suitable for various tasks such as semantic textual similarity, semantic search, paraphrase mining, text classification, and clustering.
📦 Installation
First, you need to install the Sentence Transformers library:
pip install -U sentence-transformers
💻 Usage Examples
Basic Usage
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("Corran/SciTopicNomicEmbed")
sentences = [
'The IANA Task Force (2021) builds upon previous research suggesting that slower gait speed is associated with increased risk of adverse outcomes in older adults (Levine et al., 2015; Schoenfeld et al., 2016).',
'Gait speed at usual pace as a predictor of adverse outcomes in community - dwelling older people an International Academy on Nutrition and Aging (IANA) Task Force',
'Referring to another writer’s idea(s) or position',
]
embeddings = model.encode(sentences)
print(embeddings.shape)
similarities = model.similarity(embeddings, embeddings)
print(similarities.shape)
📚 Documentation
Model Details
Model Description
Property |
Details |
Model Type |
Sentence Transformer |
Base model |
nomic-ai/nomic-embed-text-v1.5 |
Maximum Sequence Length |
8192 tokens |
Output Dimensionality |
768 dimensions |
Similarity Function |
Cosine Similarity |
Training Dataset |
sci_topic_triplets |
Language |
en |
License |
apache - 2.0 |
Model Sources
Full Model Architecture
SentenceTransformer(
(0): Transformer({'max_seq_length': 8192, 'do_lower_case': False}) with Transformer model: NomicBertModel
(1): Pooling({'word_embedding_dimension': 768, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': True, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False, 'include_prompt': True})
)
Evaluation
Metrics
Information Retrieval
Metric |
Value |
cosine_accuracy@1 |
0.1975 |
cosine_accuracy@3 |
0.5547 |
cosine_accuracy@5 |
0.8161 |
cosine_accuracy@10 |
0.9893 |
cosine_precision@1 |
0.1975 |
cosine_precision@3 |
0.1849 |
cosine_precision@5 |
0.1632 |
cosine_precision@10 |
0.0989 |
cosine_recall@1 |
0.1975 |
cosine_recall@3 |
0.5547 |
cosine_recall@5 |
0.8161 |
cosine_recall@10 |
0.9893 |
cosine_ndcg@10 |
0.5664 |
cosine_mrr@10 |
0.4327 |
cosine_map@100 |
0.4333 |
Training Details
Training Dataset
- Dataset: sci_topic_triplets at 8bf9936
- Size: 35,964 training samples
- Columns:
query
, positive
, and negative
- Approximate statistics based on the first 1000 samples:
|
query |
positive |
negative |
type |
string |
string |
string |
details |
- min: 17 tokens
- mean: 40.37 tokens
- max: 93 tokens
|
- min: 5 tokens
- mean: 18.75 tokens
- max: 56 tokens
|
- min: 5 tokens
- mean: 10.74 tokens
- max: 23 tokens
|
- Samples:
query |
positive |
negative |
This study provides comprehensive estimates of life expectancy, all - cause mortality, and cause - specific mortality for 249 causes of death and 195 countries and territories from 1980 to 2015, allowing for a detailed understanding of global health trends and patterns over the past four decades. |
Global, regional, and national life expectancy, all - cause mortality, and cause - specific mortality for 249 causes of death, 1980–2015: a systematic analysis for the Global Burden of Disease Study 2015 |
Explaining the significance of the current study |
This paper explores the relationship between the expected value and the volatility of the nominal excess return on stocks using a econometric approach. |
On the Relation between the Expected Value and the Volatility of the Nominal Excess Return on Stocks |
Stating the focus, aim, or argument of a short paper |
Despite the increasing attention given to the role of audit committees and board of directors in mitigating earnings management, several studies have reported inconclusive or even negative findings. |
Audit committee, board of director characteristics, and earnings management |
General reference to previous research or scholarship: highlighting negative outcomes |
- Loss:
MatryoshkaLoss
with these parameters:{
"loss": "MultipleNegativesRankingLoss",
"matryoshka_dims": [
768,
384,
256,
128,
64
],
"matryoshka_weights": [
1,
1,
1,
1,
1
],
"n_dims_per_step": -1
}
Evaluation Dataset
- Dataset: sci_topic_triplets at 8bf9936
- Size: 4,495 evaluation samples
- Columns:
query
, positive
, and negative
- Approximate statistics based on the first 1000 samples:
|
query |
positive |
negative |
type |
string |
string |
string |
details |
- min: 18 tokens
- mean: 40.1 tokens
- max: 87 tokens
|
- min: 5 tokens
- mean: 18.75 tokens
- max: 58 tokens
|
- min: 5 tokens
- mean: 10.74 tokens
- max: 23 tokens
|
- Samples:
query |
positive |
negative |
In this cluster - randomised controlled trial, the authors aimed to evaluate the effectiveness of introducing the Medical Emergency Team (MET) system in reducing response times and improving patient outcomes in emergency departments. |
Introduction of the medical emergency team (MET) system: a cluster - randomised controlled trial |
Some ways of introducing quotations |
In the data collection phase of our study, we employed both surveys and interviews as research methods. Specifically, we administered surveys to 200 participants and conducted interviews with 10 key industry experts to gather proportional data on various aspects of management science practices. |
Research Methodology: A Step - by - Step Guide for Beginners |
Surveys and interviews: Reporting proportions |
Several density functional theory (DFT) based chemical reactivity indexes, such as the Fukui functions and the electrophilic and nucleophilic indices, are discussed in detail for their ability to predict chemical reactivity. |
Chemical reactivity indexes in density functional theory |
General comments on the relevant literature |
- Loss:
MatryoshkaLoss
with these parameters:{
"loss": "MultipleNegativesRankingLoss",
"matryoshka_dims": [
768,
384,
256,
128,
64
],
"matryoshka_weights": [
1,
1,
1,
1,
1
],
"n_dims_per_step": -1
}
Training Hyperparameters
Non - Default Hyperparameters
eval_strategy
: steps
per_device_train_batch_size
: 256
per_device_eval_batch_size
: 256
learning_rate
: 2e - 05
num_train_epochs
: 10
warmup_ratio
: 0.1
fp16
: True
load_best_model_at_end
: True
All Hyperparameters
Click to expand
overwrite_output_dir
: False
do_predict
: False
eval_strategy
: steps
prediction_loss_only
: True
per_device_train_batch_size
: 256
per_device_eval_batch_size
: 256
per_gpu_train_batch_size
: None
per_gpu_eval_batch_size
: None
gradient_accumulation_steps
: 1
eval_accumulation_steps
: None
torch_empty_cache_steps
: None
learning_rate
: 2e - 05
weight_decay
: 0.0
adam_beta1
: 0.9
adam_beta2
: 0.999
adam_epsilon
: 1e - 08
max_grad_norm
: 1.0
num_train_epochs
: 10
max_steps
: -1
lr_scheduler_type
: linear
lr_scheduler_kwargs
: {}
warmup_ratio
: 0.1
warmup_steps
: 0
log_level
: passive
log_level_replica
: warning
log_on_each_node
: True
logging_nan_inf_filter
: True
save_safetensors
: True
save_on_each_node
: False
save_only_model
: False
📄 License
This model is licensed under the apache - 2.0 license.