Jade-Software/Jade-ModernBert-FT
Jade-modernbert-ft
internally on leaderboard known as jade-ft-14-bert This is a sentence-transformers model finetuned from nomic-ai/modernbert-embed-base on the jadeembeddingstrain_25.04.04 dataset. It maps sentences & paragraphs to a 768-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
Model Details
Model Description
- Model Type: Sentence Transformer
- Base model: nomic-ai/modernbert-embed-base <!-- at revision d556a88e332558790b210f7bdbe87da2fa94a8d8 -->
- Maximum Sequence Length: 8192 tokens
- Output Dimensionality: 768 dimensions
- Similarity Function: Cosine Similarity
- Training Dataset:
- jadeembeddingstrain_25.04.04
- Language: en
- License: apache-2.0
Model Sources
- Documentation: Sentence Transformers Documentation
- Repository: Sentence Transformers on GitHub
- Hugging Face: Sentence Transformers on Hugging Face
Full Model Architecture
SentenceTransformer(
(0): Transformer({'max_seq_length': 8192, 'do_lower_case': False}) with Transformer model: ModernBertModel
(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})
(2): Normalize()
)Usage
Direct Usage (Sentence Transformers)
First install the Sentence Transformers library:
pip install -U sentence-transformersThen you can load this model and run inference.
from sentence_transformers import SentenceTransformer
# Download from the 🤗 Hub
model = SentenceTransformer("lwoollett/jade-ft-14-bert-static")
# Run inference
sentences = [
'Which subclasses are associated with the JadeXMLCharacterData class?',
'## JadeXMLCharacterData Class\n\nThe **JadeXMLCharacterData** class is the abstract superclass of character-based nodes in an XML document tree; that is, the text, **CDATA**, and comment nodes.\n\nFor details about the property defined in the **JadeXMLCharacterData** class, see "[JadeXMLCharacterData Property](jadexmlcharacterdata_property.htm)", in the following section.\n\n[JadeXMLNode](../jadexmlnode_class/jadexmlnode_class.htm)\n\n[JadeXMLCDATA](../jadexmlcdata_class/jadexmlcdata_class.htm), [JadeXMLComment](../jadexmlcomment_class/jadexmlcomment_class.htm), [JadeXMLText](../jadexmltext_class/jadexmltext_class.htm)',
"### Minimizing the Working Set\n\nIn loops where there are multiple filters, apply the cheapest filters first and then the filters that reduce the working set the most. For example, consider the following code fragment, which finds sales of appliances in a specified city.\n\n```\nwhile iter.next(tran) do\r\n if tran.type = Type_Sale\r\n and tran.myBranch.myLocation.city = targetCity\r\n and tran.myProduct.isAppliance then\r\n <do something with tran>\r\n endif;\r\nendwhile;\n```\nIn this example, **tran.type** should be checked first, because it is the cheapest. The **tran** object must be fetched to evaluate all of the other conditions, so we may as well check the **type** attribute first. If we did the **isAppliance** check first, we would have to fetch all of the product objects for the transactions that were not sales. Regardless of how many transactions are sales and how many products are appliances, it will save time to check **tran.type** first.\n\nNow, assume that:\n\n- 80 percent of transactions are sales\n\n- 15 percent, on average, are likely to be in the target city\n\n- 90 percent of the products are appliances\n\nIt pays to check the city first, even though it means fetching the branch and location objects for the non‑appliance products. There are very few non‑appliance products, so the number of extra fetches is small. By contrast, checking for non‑appliance products for all other cities would result in a large number of extra fetches.\n\nIt doesn't matter if the filters are conditions of an [if](../../devref/ch1languageref/if_instruction.htm#if) instruction, multiple [if](../../devref/ch1languageref/if_instruction.htm#if) instructions, or multiple conditions in the [where](../../devref/ch1languageref/where_clause_optimization.htm#whereoptimization) clause of a [while](../../devref/ch1languageref/while_instruction.htm#while) statement; the end result is the same.\n\nThis code fragment example is simple and concise, to convey the concept. In the real world, each successive filter may be in another method, another class, or even another schema. It may take a bit of investigation to find all of the filters involved in a single loop.",
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 768]
# Get the similarity scores for the embeddings
similarities = model.similarity(embeddings, embeddings)
print(similarities.shape)
# [3, 3]<!--
Direct Usage (Transformers)
<details><summary>Click to see the direct usage in Transformers</summary>
</details> -->
<!--
Downstream Usage (Sentence Transformers)
You can finetune this model on your own dataset.
<details><summary>Click to expand</summary>
</details> -->
<!--
Out-of-Scope Use
List how the model may foreseeably be misused and address what users ought not to do with the model. -->
<!--
Bias, Risks and Limitations
What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model. -->
<!--
Recommendations
What are recommendations with respect to the foreseeable issues? For example, filtering explicit content. -->
Training Details
Training Dataset
jadeembeddingstrain_25.04.04
- Dataset: jadeembeddingstrain_25.04.04
- Size: 10,217 training samples
- Columns: <code>anchor</code> and <code>positive</code>
- Approximate statistics based on the first 1000 samples: | | anchor | positive | |:--------|:----------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------| | type | string | string | | details | <ul><li>min: 8 tokens</li><li>mean: 17.17 tokens</li><li>max: 30 tokens</li></ul> | <ul><li>min: 27 tokens</li><li>mean: 363.15 tokens</li><li>max: 6303 tokens</li></ul> |
- Samples: | anchor | positive | |:------------------------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | <code>What is the format for defining a Byte constant in JADE?</code> | <code>##### Constant Definition Tips<br><br>When defining a constant value, the value of a constant can be a simple literal value or an expression constructed using literals and other constants. For details about literal types, see "Literals", in Chapter - 1 of the Developer's Reference.<br><br>You can define the value for a constant whose primitive type is not a specific literal format by using a typecast of a String literal or in the case of a Byte, a small Integer literal, as shown in the examples in the following table.<br><br>| Primitive Type | Value Expression |<br>| ---- | ---- |<br>| Date | "31/12/2007".Date |<br>| Time | "14:34:23.123".Time |<br>| TimeStamp | "31/12/2007, 14:34:23:123".TimeStamp |<br>| Point | "1,7".Point |<br>| Byte | 0.Byte |<br><br>For details about typecasting, see "Type Casts: String;<br>```<br>The replaceFrom__ method of the String primitive type replaces only the first occurrence of the substring specified in the target parameter with the substring specified in the replacement parameter, starting from the specified startIndex parameter.<br><br>Case‑sensitivity is ignored if you set the value of the bIgnoreCase parameter to true. Set this parameter to false if you want the substring replacement to be case‑sensitive.<br><br>This method raises exception 1413 (Index used in string operation is out of bounds) if the value specified in the startIndex parameter is less than 1 or it is greater than the length of the original string. In addition, it returns the original receiver String if the value specified in the target parameter has a length of zero (**...</code> | | <code>What does the global constant ExContinue do?</code> | <code>## Exceptions Category<br><br>The global constants for exceptions are listed in the following table.<br><br>| Global Constant | Integer Value | Description |<br>| ---- | ---- | ---- |<br>| ExAbortAction | 1 | Causes the currently executing methods to be aborted. |<br>| ExContinue | 0 | Resumes execution from the next expression after the expression that caused the exception. |<br>| ExPassBack | -1 | Passes control back to the prior local exception handler for this type of exception, or if a local handler is not found, a global exception handler for this type of exception. |<br>| ExResumeMethodEpilog | 3 | Passes control back to the method that armed the exception handler. Execution resumes at the start of the method epilog or at the end of the method if there is no epilog section. Execution resumes at the next statement in the epilog if the exception was raised while executing the epilog. If there were no messages on the execution stack when the handler was armed, the effect of theExResumeMethodEpilog...</code> |
- Loss: <code>CachedMultipleNegativesRankingLoss</code> with these parameters:
{
"scale": 20.0,
"similarity_fct": "cos_sim",
"mini_batch_size": 32
}Evaluation Dataset
jadeembeddingstrain_25.04.04
- Dataset: jadeembeddingstrain_25.04.04
- Size: 1,136 evaluation samples
- Columns: <code>anchor</code> and <code>positive</code>
- Approximate statistics based on the first 1000 samples: | | anchor | positive | |:--------|:----------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------| | type | string | string | | details | <ul><li>min: 8 tokens</li><li>mean: 17.07 tokens</li><li>max: 41 tokens</li></ul> | <ul><li>min: 25 tokens</li><li>mean: 365.93 tokens</li><li>max: 3397 tokens</li></ul> |
- Samples: | anchor | positive | |:------------------------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | <code>What is the keyword list constant value for JADESYSTEMVARS?</code> | <code>### changeKeywords<br><br>```<br>changeKeywords(action: Integer; <br> keywordList: Integer; <br> keywords: String);<br>```<br>The **changeKeywords** method of the [JadeTextEdit](../controlclass/jadetexteditclass.htm) class modifies one or more of the current keyword lists. The keyword lists are used by the current language lexical analyzer to classify the tokens found in the text. For the Jade language, this includes keywords, class names, constant names, and so on.<br><br>The value of the **action** parameter can be one of the **JadeTextEdit** class constants listed in the following table.<br><br>| Class Constant | Value | Description |<br>| ---- | ---- | ---- |<br>| KEYWORDSADD | 2 | Adds the keywords specified in thekeywordsparameter to the list specified in thekeywordListparameter. |<br>| KEYWORDSDELETE | 3 | Deletes the words specified in thekeywordsparameter from the list specified in thekeywordListparameter. |<br>| KEYWORDSSET | 1 | Clears the list specified in thekeywordListparam...</code> | | <code>What should you click to abandon the deletion of a report in JADE?</code> | <code>#### Delete Report Command<br><br>Use the Delete Report command from the File menu to delete a report.<br><br>To delete a report<br><br>1. Select the Delete Report command from the File menu. The Delete Report dialog, shown in the following image, is then displayed.<br><br>[](../images/reportdelete_feb2022.png)<br><br>2. Select the report that you want to delete from the Report list box or enter the name in the Report name text box.<br><br>3. Filter the list of report names in the Reports list box in one or both of the following ways.<br><br> - To display only those reports that contain that text in their report description, enter text in the Text contains text box. For example, only those reports that mention Pay in their description are displayed if you enter Pay, providing a refined selection list.<br><br> - To display only those reports modified during a specified period, select a last modified period from the Last modified list box. For example, only those reports that were modified in...</code> | | <code>What types of objects can be set for the userGroupObject in JadeMultiWorkerTcpTransport?</code> | <code>#### userGroupObject<br><br>Type: - Object<br><br>The userGroupObject property of the JadeMultiWorkerTcpTransport class contains a reference to an object that you can associate with the transport group between event callbacks.<br><br>You must set the value of this property to a shared transient or a persistent object, as it must be visible to other workers.<br><br>The default value is null.<br><br>To prevent an object leak, it is your responsibility to delete this object, if required, in your implementation of the closedEvent method in the receiver class.</code> |
- Loss: <code>CachedMultipleNegativesRankingLoss</code> with these parameters:
{
"scale": 20.0,
"similarity_fct": "cos_sim",
"mini_batch_size": 32
}Training Hyperparameters
Non-Default Hyperparameters
eval_strategy: stepsper_device_train_batch_size: 18per_device_eval_batch_size: 18num_train_epochs: 4warmup_ratio: 0.1bf16: Truebatch_sampler: no_duplicates
All Hyperparameters
<details><summary>Click to expand</summary>
overwrite_output_dir: Falsedo_predict: Falseeval_strategy: stepsprediction_loss_only: Trueper_device_train_batch_size: 18per_device_eval_batch_size: 18per_gpu_train_batch_size: Noneper_gpu_eval_batch_size: Nonegradient_accumulation_steps: 1eval_accumulation_steps: Nonetorch_empty_cache_steps: Nonelearning_rate: 5e-05weight_decay: 0.0adam_beta1: 0.9adam_beta2: 0.999adam_epsilon: 1e-08max_grad_norm: 1.0num_train_epochs: 4max_steps: -1lr_scheduler_type: linearlr_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: Truefp16: Falsefp16_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: 0dataloader_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: {'minnumparams': 0, 'xla': False, 'xlafsdpv2': False, 'xlafsdpgrad_ckpt': False}tp_size: 0fsdp_transformer_layer_cls_to_wrap: Noneaccelerator_config: {'splitbatches': False, 'dispatchbatches': None, 'evenbatches': True, 'useseedablesampler': True, 'nonblocking': False, 'gradientaccumulationkwargs': 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: 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: no_duplicatesmulti_dataset_batch_sampler: proportional
</details>
Training Logs
Framework Versions
- Python: 3.11.11
- Sentence Transformers: 4.0.2
- Transformers: 4.51.0
- PyTorch: 2.8.0.dev20250319+cu128
- Accelerate: 1.6.0
- Datasets: 3.5.0
- Tokenizers: 0.21.1
Citation
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",
}CachedMultipleNegativesRankingLoss
@misc{gao2021scaling,
title={Scaling Deep Contrastive Learning Batch Size under Memory Limited Setup},
author={Luyu Gao and Yunyi Zhang and Jiawei Han and Jamie Callan},
year={2021},
eprint={2101.06983},
archivePrefix={arXiv},
primaryClass={cs.LG}
}<!--
Glossary
Clearly define terms in order to be accessible across audiences. -->
<!--
Model Card Authors
Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction. -->
<!--
Model Card Contact
Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors. -->
