Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks
Paper • 1908.10084 • Published • 16
How to use patentory/patentory_model with sentence-transformers:
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("patentory/patentory_model")
sentences = [
"cosmetic and dermatolic compositions containing chitosan and phospholipids [SEP] obtain the subject preparation which can be prescribed into a freely flowable preparation or a creamy preparation, has very good characteristics on makeup with respect to stickiness, has a good skin care performance, and is useful for skin care creams and so on by including specific chitosan and a phospholipid. this preparation contains (a) chitosan having an average mol.wt. of 10,000 to 2,000,000 g/mol and a deacylation degree of 10 to 99%, and (b) one or more kinds of phospholipids (for example, lecithin). the component a especially has an average mol.wt. of 100,000 to 1,000,000 g/mol and a deacylation degree of 55 to 99%. the preparation preferably contains the component a in an amount of 01 to 50 wt.%, especially 25 to 5 wt.%, and the component b in an amount of 001 to 30 wt.%, especially 5 to 5 wt.%, based on the total weight of the preparation. [SEP] cosmetic or dermatological preparations which comprise (a) chitosan of average molecular weight from 100 000 to 1 000 000 g/mol and a degree of deacetylation of from 10 to 99% and (b) one or more phospholipids.",
"variants of human recombinant interferon-.gamma. (rhu-ifn-.gamma.) having increased heat-stability [SEP] the invention concerns variants of recombinant human interferon-.gamma. (rhuifn-.gamma.) having increased heat-stability. proceeding from rhu-ifn-.gamma., at least one of the following amino acid pairs is changed into cysteine in the amino acid sequence of the polypeptide monomer: glu8 and ser70, ala18 and his112, lys81 and leu121, and gln49 and leu96. additionally, the c-terminal end of the polypeptide can be shortened by between 1 and 10 amino acids. the novel proteins according to the invention have greater heat-stability than the unchanged rhu-ifn-.gamma. without any loss in biological activity. the invention further concerns the preparation of the oligonucleotides, vectors and micro-organisms necessary for producing the proteins according to the invention. finally, the invention concerns a process for the preparation of the proteins and uses thereof. [SEP] polypeptide having the following amino acid sequence: wherein xaa and xab, xba and xbb, xca and xcb or xda and xdb in each case designate pairs of amino acids and the amino acids of at least one of these pairs are cysteine in pairs and wherein the following applies for the amino acids which are not cysteine: xaa = glu, xab = ser xab = ala, xbb = his xca = lys, xcb = leu xda = gln, xdb = leu, the variants of same in which the c-terminal end is shortened by 1 to 10 amino acids, and their homodimers.",
"skin care compositions [SEP] the present invention relates to a topical skin care formulation comprised of micronized calcium citrate and salicylic acid. this composition provides a method for treating acne as well as providing for a variety of skin beautification products which are especially applicable to sensitive skin. [SEP] a method for removing soft corns in a human having a skin affected thereby comprising administering topically to the affected skin a therapeutically effective amount of micronized calcium citrate and salicylic acid.",
"biodegradable biocompatible implant and method of manufacturing same [SEP] formulations or delivery systems are provided for controlled release of therapeutically active agents. the delivery systems are composed of polymer and lipid materials and may be prepared as a gel, paste, solution, film, implant or barrier depending on the intended application. the polymer component of the matrix is the naturally occurring biomaterial, chitosan, or a mixture of chitin and chitosan. the lipid component may include phosphatidylcholine, phosphatidylserine, phosphatidylinositol, phosphatidyl or a mixture thereof. the delivery system may be used for delivery of hydrophilic agents, hydrophobic agents or combinations thereof. the therapeutically active agents may be formulated within the matrix as free agents or incorporated into particles. in a preferred embodiment the agents are incorporated into polymeric particles that are dispersed throughout the matrix. [SEP] a drug delivery composition comprising: (a) a phospholipid, (b) a chitosan based material, and (c) at least one pharmaceutically active agent wherein the phospholipid and the chitosan based material form a physically cross-linked matrix for controlled release of the pharmaceutically active agent."
]
embeddings = model.encode(sentences)
similarities = model.similarity(embeddings, embeddings)
print(similarities.shape)
# [4, 4]This is a sentence-transformers model finetuned from mpi-inno-comp/paecter. It maps sentences & paragraphs to a 1024-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
SentenceTransformer(
(0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: BertModel
(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})
)
First install the Sentence Transformers library:
pip install -U sentence-transformers
Then you can load this model and run inference.
from sentence_transformers import SentenceTransformer
# Download from the 🤗 Hub
model = SentenceTransformer("sentence_transformers_model_id")
# Run inference
sentences = [
'log information gathering/analyzing device [SEP] permit a log information gathering/analyzing device to make the display part of a chart showing an operation situation when a program is executed, correspond to a source program. a log information gathering means 1, a log information preservation means 2, a log information analysis means 3, a chart generation means 4, a display means 5, a screen position designation means 6 judging a position on the chart and a source position analysis means 7 for analyzing the position of the source program, which corresponds to the position on the chart, are provided. the function name and line number on the source program, which correspond to the position, can be known from position information on the chart that the user designates. a function designation means 8 inputting the function name and the position in the source program and a display position analysis means 9 analyzing the display position on the chart from the inputted function name and the position are provided. thus, the display position on the chart can be learnt from the function name and the line number, which the user designates. [SEP] an apparatus for log data collection and analysis which is used for analyzing behavior of a program, comprising: log data collecting means for collecting log records while the program is in execution, each of the log records including information regarding an operation type and execution time of each part of the program; log data storage means for storing the log records collected by said log data collecting means; log data analyzing means for retrieving the log records from said log data storage means and analyzing the operation type and the execution time of each log record; diagram generating means for generating a history diagram that visualizes the analyzed log records in temporal order, the history diagram being organized into a plurality of segments that represent the respective log records; display means for displaying on a screen the history diagram generated by said diagram generating means; and association analyzing means for performing analysis of part-to-part association between the displayed history diagram and a source program in response to an instruction from a user and for providing said diagram generating means and/or said display means with the part-to-part association clarified through the analysis, wherein the source program is a set of instruction statements from which the program in executable form is translated.',
'dynamic update of a user interface based on collected user interactions [SEP] while a user is using the electronic device, user interaction information for keystrokes, button pushes, and activation of functional controls may be recorded. the user interaction information is stored and when the electronic device is connected to a network, the user interaction information is sent over the network to a user interface analyzer. the user interface analyzer analyzes the user interaction information to determine patterns of usage regarding a hierarchy of menu items for the user interface. the analysis may show that a user interface may be improved for better usability. the user interface on the electronic device may be dynamically changed to alter the menu hierarchy, or the analysis may be used to improve future generations of products. for example, menu items may be positioned such that the user can more easily access menu items that are used more frequently. [SEP] a method for analyzing use of a user interface, the method comprising: determining user interaction information at an electronic device while a user is using the electronic device, the determining occurring independently of whether the device is connected to a network; storing a log of the determined user interaction information in the electronic device; after a connection between the electronic device and a network is detected, transmitting the stored log over the network to a user interface analyzer; analyzing the user interaction information at the user interface analyzer to determine patterns of usage regarding navigating a hierarchy of menu items in the user interface of the electronic device by identifying multiple keystrokes and ascertaining whether the multiple key strokes are associated with a common keystroke sequence, wherein the hierarchy of menu items comprises first and second branches of menu items; determining, at the user interface analyzer, a possible function that the user was searching for, the determining of the possible function being based on the analysis of the user interaction information revealing that during a navigation of the first branch of menu items, the user did not select any menu item triggering the possible function, and that during a subsequent navigation of the second branch of menu items, the user did select one menu item in the hierarchy of menu items, the selected item triggering the possible function; storing an analysis result for the determination of the possible function at the user interface analyzer; and using the stored analysis result to change the hierarchy of menu items to facilitate selection of the menu item triggering the possible function, wherein the user interface analyzer sends interface adjustment information to the electronic device over the network to allow the electronic device to change the hierarchy of menu items based on the stored analysis result by changing a location of the menu item triggering the possible function from the second branch of the menu items to the first branch of menu items based on the interface adjustment information.',
'memory recovery scheme and data structure in a heating, ventilation and air conditioning network [SEP] a method for updating a parameter in a device in an hvac network includes, in one embodiment, sending, by an interface to the device, 1) a parameter value change message, and 2) a new value of an installer parameter. the device determines if the new value is within an allowed range. the parameter is updated with the new value in a memory of the device if the parameter update is within the allowed range. the device sends the parameter to the interface. the parameter is relayed by the interface to an active subnet controller of the hvac network. [SEP] a method for updating a parameter in a device in an hvac network, comprising: sending, by an interface to said device: a) a parameter value change message, and b) a new value of an installer parameter; determining by said device if said new value is within an allowed range; updating said parameter with said new value in a memory of said device if said parameter update is within said allowed range; sending, by said device, said updated parameter to said interface; and relaying, by said interface, said updated parameter to an active subnet controller of said hvac network.',
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 1024]
# Get the similarity scores for the embeddings
similarities = model.similarity(embeddings, embeddings)
print(similarities.shape)
# [3, 3]
anchor, positive, and negative| anchor | positive | negative | |
|---|---|---|---|
| type | string | string | string |
| details |
|
|
|
| anchor | positive | negative |
|---|---|---|
blanking aperture array device for multi-beams and fabrication method of blanking aperture array device for multi-beams [SEP] provide a method of manufacturing a blanking aperture array device, capable of suppressing surface charging due to multibeam irradiation, by a simpler process. a method of manufacturing a blanking aperture array device of multibeam includes a step for forming a plurality of electrodes 24, 26 and a plurality of pads 29 on a metal film 340, by using a substrate 300 having a surface on which an insulating film 310, a metal film 320, an insulating film 330, and a metal film 340 are laminated in order from the lower layer side, a step for removing a part of the metal film 340 by etching, a step for removing the insulating film 330 by etching, with the plurality of electrodes, plurality of pads and the remainder of the metal film 340 as a mask, and a step for forming a plurality of passing holes 25, each penetrating the substrate at a position between a pair of electr... |
electron beam exposure method and system for exposing a pattern on a substrate with an improved accuracy and throughput [SEP] an electron beam exposure process includes a step of producing a plurality of electron beam elements from a single electron beam by shaping and radiating the plurality of electron beam elements on a substrate. the exposure is achieved in a plurality of times with respective electron beam patterns by means of different sets of electron beam elements, wherein the electron beam elements of different sets are produced simultaneously and deflected simultaneously so as to scan the substrate consecutively. the electron beam elements in one set are offset from corresponding electron beam elements of the other set by a pitch of m/n wherein n represents the number of the electron beam sets and m is an integer smaller than n. [SEP] a method for exposing a pattern on an object by means of an electron beam, comprising the steps of: producing an electron beam such that said e... |
mobile energy carrier and energy storage device [SEP] a mobile energy carrier with which energy in the form of materials from zones distributed widely throughout the world, for example with a large amount of solar energy, wind energy or other co 2 -neutral energy, for example the equator, can be transported to zones where there is a high energy requirement, for example europe. [SEP] a method for energy transport and/or energy storage, comprising: obtaining electrical energy from at least one of sun, wind, biogas, and excessively produced electrical energy; producing, from the electrical energy, an energy carrier formed as an elementary metal; changing the energy carrier to a transportable or storable species; transporting or storing the energy carrier in the transportable or storable species; and releasing the electrical energy stored in the energy carrier by reaction with at least one of water and oxygen. |
cartridge for cleaning, drive device, adjusting method for magnetic head, and magnetic storage system [SEP] provide a cartridge for cleaning, using new magnetic tape travel control, a drive device, an adjusting method for a magnetic head, and a magnetic recording system which enable a user to adjust the magnetic head while performing cleaning operation on the site and further enable the user to detect and predict a fault of the magnetic head by performing the cleaning operation. the adjusting method for the magnetic head includes a step for setting the cartridge for cleaning in the drive device, a step for judging that the cartridge for cleaning is loaded by checking a cleaning bit in a nonvolatile memory, a step for performing adjusting operation after the cleaning operation when judging that the cleaning cartridge is loaded, and a step for reading a pattern signal out of a specified area of a magnetic tape held in the cleaning cartridge. [SEP] a drive unit comprising: means for ident... |
linear tape drive head cleaning process [SEP] a method is provided for cleaning a transducer head in a tape drive. the method includes the steps of: providing a tape drive with a head cleaning device, a data tape cartridge having data tape, and a cleaning tape cartridge having cleaning tape; detecting error rate for the transducer head with the data tape; determining when the detected error rate exceeds a specified level; and when the detected error rate exceeds a specified level, loading the cleaning tape cartridge into the tape drive and running cleaning media on the cleaning tape over the transducer head to clean the transducer head. another method includes using a head cleaning device to clean the transducer head when there is an identified need, or as a preventative measure. [SEP] a linear tape drive head cleaning process, comprising: providing a tape drive having a head cleaning device, and a data tape cartridge having data tape; inserting the data tape cartridge into the tape dr... |
tunnel-type magneto-resistance effect elemet and manufacturing method therefor [SEP] solve a problem that the control of the introduced pressure of oxygen and time is difficult and only a metallic layer is completely oxidized since an insulating barrier is necessary to be formed thin at the time of forming the insulating barrier of the metallic layer by oxidization in a conventional tunnel-type magneto-resistance effect element. two ferromagnetic layers 11 and 12 are two-dimensionally installed on an insulating barrier layer since the insulating barrier layer 10 can previously be formed, it is not necessary to consider the influence of the ferromagnetic layers 11 and 12 to oxidization at the time of forming the insulating burrier layer 10 by oxidizing the metallic layer. the insulating barrier layer 10 can be formed thick and the defect of a pin hole can be suppressed. thus, the tunnel-type magneto-resistance effect element with a satisfactory characteristic can be manufactured. [SEP] ... |
image forming apparatus [SEP] provide an image forming apparatus in which a residual toner remaining on a latent electrostatic image bearing member is recovered and reused, the contamination of a charging member to charge the latent electrostatic image bearing member is prevented, the recovery of the residual toner at a development step is facilitated, and superior image stability is ensured, and to provide a toner, a toner container and a process cartridge. in the image forming apparatus in which the residual toner remaining on a surface of the latent electrostatic image bearing member, after transfer is passed from the latent electrostatic image bearing member through a charging component of the subsequent recharging unit for recharging and is then recovered in a developing device; the charging component is a polymer sheet having a surface roughness (ra) of 12- 51 m; the toner contains at least a pigment, a binder resin and a releasing agent, and contains inorganic fine particles as ... |
toner and method of preparing the toner [SEP] a toner is provided including a binder resin, a colorant, and a release agent, which has a volume average particle diameter (dv) of from 3 to 9 m, and wherein the binder resin and the release agent form a sea-island structure in which the island formed of the release agent is dispersed in the sea formed of the binder resin in a cross-sectional image of the toner obtained by a transmission electron microscope (tem), and the following relationships are satisfied: ib>ia and ib>ic, wherein each of ia, ib, and ic represents an area ratio (%) of the island in an outermost region (a) of the cross-sectional image of the toner, an intermediate region (b) thereof located under the outermost region (a), and an innermost region (c) thereof located under the intermediate region (b); and a method of preparing the toner. [SEP] a toner, comprising: a binder resin; a colorant; and a release agent, wherein the toner has a volume average particle diameter (dv... |
vibration device for dust removal and imaging device [SEP] a vibration device comprises a vibrating member having at least n (n 2) piezoelectric elements arranged on a vibrating plate, each of the piezoelectric elements being formed by using a lead-free piezoelectric material and electrodes, wherein if the temperature that maximizes the piezoelectric constant of the piezoelectric material of each of the n piezoelectric elements is expressed as t m (m being a natural number between 1 and n), at least two of t 1 through t n differ from each other. [SEP] a vibration device comprising a vibrating member having at least n piezoelectric elements arranged on a vibrating plate, each of the piezoelectric elements being formed by using a lead-free piezoelectric material and electrodes, wherein, if a temperature that maximizes a piezoelectric constant of the piezoelectric material of each of the n piezoelectric elements is expressed as t m , at least two of t 1 through t n differ from each other,... |
MultipleNegativesRankingLoss with these parameters:{
"scale": 20.0,
"similarity_fct": "cos_sim"
}
gradient_accumulation_steps: 4learning_rate: 2e-05num_train_epochs: 1warmup_ratio: 0.1fp16: Truegradient_checkpointing: Trueoverwrite_output_dir: Falsedo_predict: Falseeval_strategy: noprediction_loss_only: Trueper_device_train_batch_size: 8per_device_eval_batch_size: 8per_gpu_train_batch_size: Noneper_gpu_eval_batch_size: Nonegradient_accumulation_steps: 4eval_accumulation_steps: Nonetorch_empty_cache_steps: Nonelearning_rate: 2e-05weight_decay: 0.0adam_beta1: 0.9adam_beta2: 0.999adam_epsilon: 1e-08max_grad_norm: 1.0num_train_epochs: 1max_steps: -1lr_scheduler_type: linearlr_scheduler_kwargs: Nonewarmup_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: 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: 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: {'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}parallelism_config: Nonedeepspeed: Nonelabel_smoothing_factor: 0.0optim: adamw_torch_fusedoptim_args: Noneadafactor: Falsegroup_by_length: Falselength_column_name: lengthproject: huggingfacetrackio_space_id: trackioddp_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: Falsehub_revision: Nonegradient_checkpointing: Truegradient_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: noneftune_noise_alpha: Noneoptim_target_modules: Nonebatch_eval_metrics: Falseeval_on_start: Falseuse_liger_kernel: Falseliger_kernel_config: Noneeval_use_gather_object: Falseaverage_tokens_across_devices: Trueprompts: Nonebatch_sampler: batch_samplermulti_dataset_batch_sampler: proportional@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",
}
@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}
}
Base model
mpi-inno-comp/paecter