返回模型
说明文档
基于 intfloat/multilingual-e5-large-instruct 的 SentenceTransformer
这是一个基于 intfloat/multilingual-e5-large-instruct 微调的 sentence-transformers 模型,在 d4-embeddings-multiple_negative 数据集上训练。它将句子和段落映射到1024维的稠密向量空间,可用于语义文本相似度、语义搜索、复述挖掘、文本分类、聚类等任务。
模型详情
模型描述
- 模型类型: Sentence Transformer
- 基础模型: intfloat/multilingual-e5-large-instruct <!-- at revision 274baa43b0e13e37fafa6428dbc7938e62e5c439 -->
- 最大序列长度: 512 个词元
- 输出维度: 1024 维
- 相似度函数: 余弦相似度
- 训练数据集:
- d4-embeddings-multiple_negative <!-- - 语言: 未知 --> <!-- - 许可证: 未知 -->
模型来源
- 文档: Sentence Transformers 文档
- 代码库: Sentence Transformers GitHub
- Hugging Face: Sentence Transformers on Hugging Face
完整模型架构
SentenceTransformer(
(0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: XLMRobertaModel
(1): Pooling({'word_embedding_dimension': 1024, '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})
(2): Normalize()
)
使用方法
直接使用 (Sentence Transformers)
首先安装 Sentence Transformers 库:
pip install -U sentence-transformers
然后您可以加载此模型并运行推理。
from sentence_transformers import SentenceTransformer
# 从 🤗 Hub 下载
model = SentenceTransformer("Lauther/d4-embeddings-v1.0")
# 运行推理
sentences = [
'ECOMP-GUARAREMA - BY-PASS',
'What is a flow computer?\nA flow computer is a device used in measurement engineering. It collects analog and digital data from flow meters and other sensors.\n\nKey features of a flow computer:\n- It has a unique name, firmware version, and manufacturer information.\n- It is designed to record and process data such as temperature, pressure, and fluid volume (for gases or oils).',
'What is a Fluid?\nA Fluid is the substance measured within a measurement system. It can be a gas or liquid, such as hydrocarbons, water, or other industrial fluids. Proper classification of fluids is essential for ensuring measurement accuracy, regulatory compliance, and operational efficiency. By identifying fluids correctly, the system applies the appropriate measurement techniques, processing methods, and reporting standards.',
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 1024]
# 获取嵌入的相似度分数
similarities = model.similarity(embeddings, embeddings)
print(similarities.shape)
# [3, 3]
<!--
直接使用 (Transformers)
<details><summary>点击查看 Transformers 中的直接使用方法</summary>
</details> -->
<!--
下游使用 (Sentence Transformers)
您可以在自己的数据集上微调此模型。
<details><summary>点击展开</summary>
</details> -->
<!--
超出范围的使用
列出模型可能被预见到的误用方式,并说明用户不应该用模型做什么。 -->
<!--
偏见、风险和局限性
这个模型有哪些已知或可预见的问题?您也可以在此标记已知的失败案例或模型的弱点。 -->
<!--
建议
针对可预见的问题有什么建议?例如,过滤显式内容。 -->
训练详情
训练数据集
d4-embeddings-multiple_negative
- 数据集: d4-embeddings-multiple_negative at 299ee20
- 大小: 3,632 个训练样本
- 列: <code>anchor</code> 和 <code>positive</code>
- 基于前1000个样本的近似统计:
anchor positive type string string details <ul><li>min: 3 tokens</li><li>mean: 8.91 tokens</li><li>max: 19 tokens</li></ul> <ul><li>min: 80 tokens</li><li>mean: 208.8 tokens</li><li>max: 406 tokens</li></ul> - 样本:
anchor positive <code>differential pressure</code> <code>What is an Uncertainty Curve Point?<br>An Uncertainty Curve Point represents a data point used to construct the uncertainty curve of a measurement system. These curves help analyze how measurement uncertainty behaves under different flow rate conditions, ensuring accuracy and reliability in uncertainty assessments.<br><br>Key Aspects of an Uncertainty Curve Point:<br>- Uncertainty File ID: Links the point to the specific uncertainty dataset, ensuring traceability.<br>Equipment Tag ID: Identifies the equipment associated with the uncertainty measurement, crucial for system validation.<br>- Uncertainty Points: Represent a list uncertainty values recorded at specific conditions, forming part of the overall uncertainty curve. Do not confuse this uncertainty points with the calculated uncertainty. <br>- Flow Rate Points: Corresponding flow rate values at which the uncertainty was measured, essential for evaluating performance under varying operational conditions.<br>These points are fundamental for generating unce...</code> <code>FQI-4300.44-101</code> <code>What is a Measurement Type?<br>Measurement types define the classification of measurements used within a system based on their purpose and regulatory requirements. These types include fiscal, appropriation, operational, and custody measurements. <br><br>- Fiscal measurements are used for tax and regulatory reporting, ensuring accurate financial transactions based on measured quantities. <br>- Appropriation measurements track resource allocation and ownership distribution among stakeholders. <br>- Operational measurements support real-time monitoring and process optimization within industrial operations. <br>- Custody measurements are essential for legal and contractual transactions, ensuring precise handover of fluids between parties. <br><br>These classifications play a crucial role in compliance, financial accuracy, and operational efficiency across industries such as oil and gas, water management, and energy distribution. </code> <code>FQI-4300-44116</code> <code>What is a Meter Stream?<br>A Meter Stream represents a measurement system configured within a flow computer. It serves as the interface between the physical measurement system and the computational processes that record and analyze flow data.<br><br>Key Aspects of a Meter Stream:<br>- Status: Indicates whether the meter stream is active or inactive.<br>- Measurement System Association: Links the meter stream to a specific measurement system, ensuring that the data collected corresponds to a defined physical setup.<br>- Flow Computer Association: Identifies the flow computer responsible for managing and recording the measurement system's data.<br>Why is a Meter Stream Important?<br>A meter stream is a critical component in flow measurement, as it ensures that the measurement system is correctly integrated into the flow computer for accurate monitoring and reporting. Since each flow computer can handle multiple meter streams, proper configuration is essential for maintaining data integrity and traceability.</code> - 损失函数: <code>MultipleNegativesRankingLoss</code> 参数如下:
{ "scale": 20.0, "similarity_fct": "cos_sim" }
评估数据集
d4-embeddings-multiple_negative
- 数据集: d4-embeddings-multiple_negative at 299ee20
- 大小: 778 个评估样本
- 列: <code>anchor</code> 和 <code>positive</code>
- 基于前778个样本的近似统计:
anchor positive type string string details <ul><li>min: 3 tokens</li><li>mean: 8.92 tokens</li><li>max: 19 tokens</li></ul> <ul><li>min: 27 tokens</li><li>mean: 214.51 tokens</li><li>max: 406 tokens</li></ul> - 样本:
anchor positive <code>FQI-4150.6122A1</code> <code>What is an Uncertainty Curve Point?<br>An Uncertainty Curve Point represents a data point used to construct the uncertainty curve of a measurement system. These curves help analyze how measurement uncertainty behaves under different flow rate conditions, ensuring accuracy and reliability in uncertainty assessments.<br><br>Key Aspects of an Uncertainty Curve Point:<br>- Uncertainty File ID: Links the point to the specific uncertainty dataset, ensuring traceability.<br>Equipment Tag ID: Identifies the equipment associated with the uncertainty measurement, crucial for system validation.<br>- Uncertainty Points: Represent a list uncertainty values recorded at specific conditions, forming part of the overall uncertainty curve. Do not confuse this uncertainty points with the calculated uncertainty. <br>- Flow Rate Points: Corresponding flow rate values at which the uncertainty was measured, essential for evaluating performance under varying operational conditions.<br>These points are fundamental for generating unce...</code> <code>FQI-4150.63122C</code> <code>What is uncertainty?<br>Uncertainty is a measure of confidence in the precision and reliability of results obtained from equipment or measurement systems. It quantifies the potential error or margin of error in measurements.<br><br>Types of uncertainty:<br>There are two main types of uncertainty:<br>1. Uncertainty of magnitudes (variables):<br> - Refers to the uncertainty of specific variables, such as temperature or pressure.<br> - It is calculated after calibrating a device or obtained from the equipment manufacturer's manual.<br> - This uncertainty serves as a starting point for further calculations related to the equipment.<br><br>2. Uncertainty of the measurement system:<br> - Refers to the uncertainty calculated for the overall flow measurement.<br> - It depends on the uncertainties of the individual variables (magnitudes) and represents the combined margin of error for the entire system.<br><br>Key points:<br>- The uncertainties of magnitudes (variables) are the foundation for calculating the uncertainty of ...</code> <code>Pressão Absoluta</code> <code>What is uncertainty?<br>Uncertainty is a measure of confidence in the precision and reliability of results obtained from equipment or measurement systems. It quantifies the potential error or margin of error in measurements.<br><br>Types of uncertainty:<br>There are two main types of uncertainty:<br>1. Uncertainty of magnitudes (variables):<br> - Refers to the uncertainty of specific variables, such as temperature or pressure.<br> - It is calculated after calibrating a device or obtained from the equipment manufacturer's manual.<br> - This uncertainty serves as a starting point for further calculations related to the equipment.<br><br>2. Uncertainty of the measurement system:<br> - Refers to the uncertainty calculated for the overall flow measurement.<br> - It depends on the uncertainties of the individual variables (magnitudes) and represents the combined margin of error for the entire system.<br><br>Key points:<br>- The uncertainties of magnitudes (variables) are the foundation for calculating the uncertainty...</code> - 损失函数: <code>MultipleNegativesRankingLoss</code> 参数如下:
{ "scale": 20.0, "similarity_fct": "cos_sim" }
训练超参数
非默认超参数
eval_strategy: stepsper_device_train_batch_size: 100per_device_eval_batch_size: 100learning_rate: 2e-05weight_decay: 0.01max_grad_norm: 0.5num_train_epochs: 10lr_scheduler_type: cosinewarmup_ratio: 0.1fp16: Truedataloader_num_workers: 4
所有超参数
<details><summary>点击展开</summary>
overwrite_output_dir: Falsedo_predict: Falseeval_strategy: stepsprediction_loss_only: Trueper_device_train_batch_size: 100per_device_eval_batch_size: 100per_gpu_train_batch_size: Noneper_gpu_eval_batch_size: Nonegradient_accumulation_steps: 1eval_accumulation_steps: Nonetorch_empty_cache_steps: Nonelearning_rate: 2e-05weight_decay: 0.01adam_beta1: 0.9adam_beta2: 0.999adam_epsilon: 1e-08max_grad_norm: 0.5num_train_epochs: 10max_steps: -1lr_scheduler_type: cosinelr_scheduler_kwargs: {}warmup_ratio: 0.1warmup_steps: 0log_level: passivelog_level_replica: warninglog_on_each_node: Truelogging_nan_inf_filter: Truesave_safetensors: Truesave_on_each_node: Falsesave_only_model: Falserestore_callback_states_from_checkpoint: Falseno_cuda: Falseuse_cpu: Falseuse_mps_device: Falseseed: 42data_seed: Nonejit_mode_eval: Falseuse_ipex: Falsebf16: Falsefp16: Truefp16_opt_level: O1half_precision_backend: autobf16_full_eval: Falsefp16_full_eval: Falsetf32: Nonelocal_rank: 0ddp_backend: Nonetpu_num_cores: Nonetpu_metrics_debug: Falsedebug: []dataloader_drop_last: Falsedataloader_num_workers: 4dataloader_prefetch_factor: Nonepast_index: -1disable_tqdm: Falseremove_unused_columns: Truelabel_names: Noneload_best_model_at_end: Falseignore_data_skip: Falsefsdp: []fsdp_min_num_params: 0fsdp_config: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}fsdp_transformer_layer_cls_to_wrap: Noneaccelerator_config: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non-blocking': False, 'gradient_accumulation_kwargs': None}deepspeed: Nonelabel_smoothing_factor: 0.0optim: adamw_torchoptim_args: Noneadafactor: Falsegroup_by_length: Falselength_column_name: lengthddp_find_unused_parameters: Noneddp_bucket_cap_mb: Noneddp_broadcast_buffers: Falsedataloader_pin_memory: Truedataloader_persistent_workers: Falseskip_memory_metrics: Trueuse_legacy_prediction_loop: Falsepush_to_hub: Falseresume_from_checkpoint: Nonehub_model_id: Nonehub_strategy: every_savehub_private_repo: Nonehub_always_push: Falsegradient_checkpointing: Falsegradient_checkpointing_kwargs: Noneinclude_inputs_for_metrics: Falseinclude_for_metrics: []eval_do_concat_batches: Truefp16_backend: autopush_to_hub_model_id: Nonepush_to_hub_organization: Nonemp_parameters:auto_find_batch_size: Falsefull_determinism: Falsetorchdynamo: Noneray_scope: lastddp_timeout: 1800torch_compile: Falsetorch_compile_backend: Nonetorch_compile_mode: Nonedispatch_batches: Nonesplit_batches: Noneinclude_tokens_per_second: Falseinclude_num_input_tokens_seen: Falseneftune_noise_alpha: Noneoptim_target_modules: Nonebatch_eval_metrics: Falseeval_on_start: Falseuse_liger_kernel: Falseeval_use_gather_object: Falseaverage_tokens_across_devices: Falseprompts: Nonebatch_sampler: batch_samplermulti_dataset_batch_sampler: proportional
</details>
训练日志
| Epoch | Step | Training Loss | Validation Loss |
|---|---|---|---|
| 0.1351 | 5 | 4.6063 | - |
| 0.2703 | 10 | 4.5611 | - |
| 0.4054 | 15 | 4.5136 | - |
| 0.5405 | 20 | 4.4686 | - |
| 0.6757 | 25 | 4.3974 | - |
| 0.8108 | 30 | 4.3636 | - |
| 0.9459 | 35 | 4.3199 | - |
| 1.0811 | 40 | 4.1099 | - |
| 1.2162 | 45 | 4.32 | - |
| 1.3514 | 50 | 4.2257 | - |
| 1.4865 | 55 | 4.2873 | - |
| 1.6216 | 60 | 4.2686 | - |
| 1.7568 | 65 | 4.2479 | - |
| 1.8919 | 70 | 4.2432 | - |
| 2.0270 | 75 | 4.0026 | - |
| 2.1622 | 80 | 4.187 | - |
| 2.2973 | 85 | 4.2103 | - |
| 2.4324 | 90 | 4.2152 | - |
| 2.5676 | 95 | 4.2713 | - |
| 2.7027 | 100 | 4.2239 | - |
| 2.8378 | 105 | 4.1924 | - |
| 2.9730 | 110 | 4.1704 | - |
| 3.1081 | 115 | 4.0059 | - |
| 3.2432 | 120 | 4.1686 | - |
| 3.3784 | 125 | 4.1632 | - |
| 3.5135 | 130 | 4.2151 | - |
| 3.6486 | 135 | 4.2386 | - |
| 3.7838 | 140 | 4.234 | - |
| 3.9189 | 145 | 4.1404 | - |
| 4.0541 | 150 | 3.9627 | 4.2148 |
| 4.1892 | 155 | 4.1705 | - |
| 4.3243 | 160 | 4.1642 | - |
| 4.4595 | 165 | 4.2132 | - |
| 4.5946 | 170 | 4.2082 | - |
| 4.7297 | 175 | 4.2228 | - |
| 4.8649 | 180 | 4.1663 | - |
| 5.0 | 185 | 3.9486 | - |
| 5.1351 | 190 | 4.1747 | - |
| 5.2703 | 195 | 4.1028 | - |
| 5.4054 | 200 | 4.1586 | - |
| 5.5405 | 205 | 4.1668 | - |
| 5.6757 | 210 | 4.2009 | - |
| 5.8108 | 215 | 4.1822 | - |
| 5.9459 | 220 | 4.1669 | - |
| 6.0811 | 225 | 3.9627 | - |
| 6.2162 | 230 | 4.1673 | - |
| 6.3514 | 235 | 4.1455 | - |
| 6.4865 | 240 | 4.0968 | - |
| 6.6216 | 245 | 4.1569 | - |
| 6.7568 | 250 | 4.1978 | - |
| 6.8919 | 255 | 4.1343 | - |
| 7.0270 | 260 | 3.9438 | - |
| 7.1622 | 265 | 4.1094 | - |
| 7.2973 | 270 | 4.1836 | - |
| 7.4324 | 275 | 4.1104 | - |
| 7.5676 | 280 | 4.138 | - |
| 7.7027 | 285 | 4.1784 | - |
| 7.8378 | 290 | 4.1437 | - |
| 7.9730 | 295 | 4.141 | - |
| 8.1081 | 300 | 3.8248 | 4.3043 |
| 8.2432 | 305 | 4.1369 | - |
| 8.3784 | 310 | 4.128 | - |
| 8.5135 | 315 | 4.1231 | - |
| 8.6486 | 320 | 4.1153 | - |
| 8.7838 | 325 | 4.1667 | - |
| 8.9189 | 330 | 4.1659 | - |
| 9.0541 | 335 | 3.8298 | - |
| 9.1892 | 340 | 4.182 | - |
| 9.3243 | 345 | 4.1639 | - |
| 9.4595 | 350 | 4.1651 | - |
| 9.5946 | 355 | 4.0624 | - |
| 9.7297 | 360 | 4.1012 | - |
| 9.8649 | 365 | 4.0938 | - |
| 10.0 | 370 | 3.857 | - |
框架版本
- Python: 3.11.0
- Sentence Transformers: 3.4.1
- Transformers: 4.49.0
- PyTorch: 2.6.0+cu124
- Accelerate: 1.4.0
- Datasets: 3.3.2
- Tokenizers: 0.21.0
引用
BibTeX
Sentence Transformers
@inproceedings{reimers-2019-sentence-bert,
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
author = "Reimers, Nils and Gurevych, Iryna",
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
month = "11",
year = "2019",
publisher = "Association for Computational Linguistics",
url = "https://arxiv.org/abs/1908.10084",
}
MultipleNegativesRankingLoss
@misc{henderson2017efficient,
title={Efficient Natural Language Response Suggestion for Smart Reply},
author={Matthew Henderson and Rami Al-Rfou and Brian Strope and Yun-hsuan Sung and Laszlo Lukacs and Ruiqi Guo and Sanjiv Kumar and Balint Miklos and Ray Kurzweil},
year={2017},
eprint={1705.00652},
archivePrefix={arXiv},
primaryClass={cs.CL}
}
<!--
术语表
明确定义术语,以便让不同受众都能理解。 -->
<!--
模型卡片作者
列出创建模型卡片的人员,为模型卡片构建中的详细工作提供认可和责任归属。 -->
<!--
模型卡片联系方式
为有模型卡片更新、建议或问题的人提供联系方式,以便与模型卡片作者联系。 -->
Lauther/d4-embeddings-v1.0
作者 Lauther
sentence-similarity
sentence-transformers
↓ 0
♥ 0
创建时间: 2025-07-15 01:30:14+00:00
更新时间: 2025-07-15 14:59:36+00:00
在 Hugging Face 上查看文件 (13)
.gitattributes
1_Pooling/config.json
README.md
config.json
config_sentence_transformers.json
model.onnx
ONNX
model.onnx_data
model.safetensors
modules.json
sentence_bert_config.json
special_tokens_map.json
tokenizer.json
tokenizer_config.json