---
language:
- en
license: apache-2.0
tags:
- sentence-transformers
- sparse-encoder
- sparse
- splade
- generated_from_trainer
- dataset_size:811257
- loss:SpladeLoss
- loss:SparseMultipleNegativesRankingLoss
- loss:FlopsLoss
base_model: distilbert/distilbert-base-uncased
widget:
- text: Turning now to FIG.1 an exemplary firewall sealing assembly 100 is shown mounted
between a firewall 102 and a duct 104.The firewall sealing assembly 100 allows
the duct 104 to extend through an opening 106 in the firewall 102 while minimizing
fluid flow communication between a first section 108 on one side of the firewall
102 and a second section 110 on another side of the firewall 102.It will be appreciated
that the duct 104 may alternatively be any one of numerous other components that
may need to extend through the firewall opening 106 such as for example piping
wires structural tubing and any other penetrating member.
- text: The inverter 22 comprises switching elements 61u 61v 61w 62u 62v 62w which
comprise MOSFETs IGBTs or the like respectively energizable by the ECU 40 and
diodes 53u 53v 53w 54u 54v 54w reverseconnected across the switching elements
61u 61v 61w 62u 62v 62w respectively.
- text: In this example a configuration general solution using an arbitrary number
N of antennas is considered.
- text: Each of the contact metal strips 7 includes an attachment fixture 7A mounted
at a strip mounting base 10 a horizontal portion 7B horizontally extended from
a bottom portion of the attachment fixture 7A a bending portion 7C elongated obliquely
upward from a leading end of the horizontal portion 7B and a contact portion 7D
provided at a leading end of the bending portion 7C so as to contact with the
terminal pin 6.The overall shape of the contact metal strips 7 is roughly a V
shape as can be seen from Fig.3.
- text: A client browser application for a user terminal the browser being capable
of recognising top level domain name parts of a network resource identifier said
browser being arranged to handle a network resource identifier in which a predetermined
top level domain name part is recognised differently from a network resource identifier
in which the top level domain name part is not recognised.
pipeline_tag: feature-extraction
library_name: sentence-transformers
---
# SPLADE model for patent matching
This is a [SPLADE Sparse Encoder](https://www.sbert.net/docs/sparse_encoder/usage/usage.html) model finetuned from [distilbert/distilbert-base-uncased](https://huggingface.co/distilbert/distilbert-base-uncased) on the json dataset using the [sentence-transformers](https://www.SBERT.net) library. It maps sentences & paragraphs to a 30522-dimensional sparse vector space and can be used for semantic search and sparse retrieval.
## Model Details
### Model Description
- **Model Type:** SPLADE Sparse Encoder
- **Base model:** [distilbert/distilbert-base-uncased](https://huggingface.co/distilbert/distilbert-base-uncased)
- **Maximum Sequence Length:** 256 tokens
- **Output Dimensionality:** 30522 dimensions
- **Similarity Function:** Dot Product
- **Training Dataset:**
- json
- **Language:** en
- **License:** apache-2.0
### Model Sources
- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
- **Documentation:** [Sparse Encoder Documentation](https://www.sbert.net/docs/sparse_encoder/usage/usage.html)
- **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
- **Hugging Face:** [Sparse Encoders on Hugging Face](https://huggingface.co/models?library=sentence-transformers&other=sparse-encoder)
### Full Model Architecture
```
SparseEncoder(
(0): MLMTransformer({'max_seq_length': 256, 'do_lower_case': False, 'architecture': 'DistilBertForMaskedLM'})
(1): SpladePooling({'pooling_strategy': 'max', 'activation_function': 'relu', 'word_embedding_dimension': 30522})
)
```
## Usage
### Direct Usage (Sentence Transformers)
First install the Sentence Transformers library:
```bash
pip install -U sentence-transformers
```
Then you can load this model and run inference.
```python
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("deter3/splade-distilbert-base-uncased-patentmatch-train-only")
# Run inference
queries = [
"The mobile device as claimed in claim 11 or claim 12 further comprising a display for displaying a list of applicationspecific places that only contains the places that have been selected by a specific application.",
]
documents = [
'A client browser application for a user terminal the browser being capable of recognising top level domain name parts of a network resource identifier said browser being arranged to handle a network resource identifier in which a predetermined top level domain name part is recognised differently from a network resource identifier in which the top level domain name part is not recognised.',
'Other variations in the components of the lid 1200 are possible in other embodiments of the invention.',
'The cylinder servo motor according to the second embodiment is identical in operation with that described in connection with the first embodiment.By means of imparting a position instruction to the servo motor the ball screw shaft 50 corresponding to the ball screw shaft 5 is actuated to a predetermined position.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[12.4191, 5.6239, 1.1307]])
```
## Training Details
### Training Dataset
#### json
* Dataset: json
* Size: 811,257 training samples
* Columns: query and positive_passage
* Approximate statistics based on the first 1000 samples:
| | query | positive_passage |
|:--------|:------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------|
| type | string | string |
| details |
The method of claim 9 wherein the first area is located at an upper part of the screen and the second area is located at a lower part of the screen. | At this point the user can touch on a third icon 734 corresponding to a third application to select the third application. |
| The mobile terminal of claim 8 wherein the controller is further configured to receive information from the specific external device indicating that the allow device search feature is enabled in the specific external device via the wireless communication unit and to control the display unit to display information requesting a user research for the specific external device. | Thereupon in this embodiment the communication device the information processing method thereof and the information processing program thereof constitute an address book DB in the data base part 18 and is constituted so that when receiving owner information from a communication terminal X namely a device of the other party by Bluetooth a Bluetooth device address ofthe communication terminal X obtained at the time of communication is recorded in the address book DB by using an owners name included in the owner information as a key. |
| The container according to claim 1 characterized in that the angle formed by the first bar 1 and the second bar 2 in the gate closing position is an obtuse angle between 150 and 180 or an acute angle between 0 and 30. | The second hydraulic actuator 25 is activated this actuator by means of the mechanical actuator 22 rotates the levers 17 in such a way that the relative small tooth 18 moves up under the edge of ring 4.The hydraulic actuator 20 is activated in such a way that the piston 21 rests on the head of the pin 6 and at the same timemoves the body 16 upwards in such a way as to eliminate the clearance existing between the small teeth 18 and the edge of ring 4 a necessary clearance to place the small teeth 18 under the edge of the ring 4 in the phase of coupling. |
* Loss: [SpladeLoss](https://sbert.net/docs/package_reference/sparse_encoder/losses.html#spladeloss) with these parameters:
```json
{
"loss": "SparseMultipleNegativesRankingLoss(scale=1.0, similarity_fct='dot_score')",
"document_regularizer_weight": 0.001,
"query_regularizer_weight": 5e-05
}
```
### Training Hyperparameters
#### Non-Default Hyperparameters
- `per_device_train_batch_size`: 24
- `gradient_accumulation_steps`: 8
- `learning_rate`: 2e-05
- `num_train_epochs`: 2
- `warmup_ratio`: 0.1
- `bf16`: True
- `batch_sampler`: no_duplicates
#### All Hyperparameters