TSDAE: Using Transformer-based Sequential Denoising Auto-Encoder for Unsupervised Sentence Embedding Learning
Paper
•
2104.06979
•
Published
This is a sentence-transformers model finetuned from Qwen/Qwen3-Embedding-0.6B. 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, 'architecture': 'Qwen3Model'})
(1): Pooling({'word_embedding_dimension': 1024, 'pooling_mode_cls_token': True, 'pooling_mode_mean_tokens': False, '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 = [
'to general appeal . 2 the inpatient in determination determination is subject to the appeal',
'Right to pursue the general claims appeal process. (2) If the beneficiary is no longer an inpatient in the hospital and is dissatisfied with this determination, the determination is subject to the general claims appeal process.',
"Column (1) Part A Cases- Use Column 1 to record information on reconsiderations of redeterminations for Part A services processed by the A/B MAC (A) Column (2) Part B of A Cases Use Column 2 to record information on reconsiderations of redeterminations for Part B services processed by the A/B MAC (A) Column (3) Part B Cases- Use Column 3 to record information on reconsiderations of redeterminations for Part B services processed by the A/B MAC (B) or DME MAC Opening Pending - Show the number of closing pending reconsiderations reported on Line 47 on the previous month's report Adjustments to Pending - If it is necessary to revise the pending figure for the close of the previous month because of inventories or reporting errors, enter the adjustment",
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 1024]
# Get the similarity scores for the embeddings
similarities = model.similarity(embeddings, embeddings)
print(similarities)
# tensor([[1.0000, 0.7645, 0.6362],
# [0.7645, 1.0000, 0.4567],
# [0.6362, 0.4567, 1.0000]])
sentence_0 and sentence_1| sentence_0 | sentence_1 | |
|---|---|---|
| type | string | string |
| details |
|
|
| sentence_0 | sentence_1 |
|---|---|
B 60 percent for calendar CY C quarters CY) in (90 percent calendar quarters in F percent, for quarters CY and all subsequent calendar. |
(B) 60 percent, for calendar quarters in CY 2015 (C) 70 percent, for calendar quarters in CY 2016 (D) 80 percent, for calendar quarters in CY 2017 (E) 90 percent, for calendar quarters in CY 2018 and (F) 100 percent, for calendar quarters in CY 2019 and all subsequent calendar years. |
To verify's, A/B (A submit a status query prospective are from the and procedure where utilization affected A hospital is 60 days of A/B MAC notice (advice) for or was resulting weighted reported QIO limit adjusted (A hospital |
To verify CMS's acceptance, the A/B MAC (A) can submit a status query Under inpatient hospital prospective payment, adjustment requests are required from the hospital where errors occur in diagnosis and procedure coding that changes the DRG, or where the deductible or utilization is affected A hospital is allowed 60 days from the date of the A/B MAC (A) payment notice (remittance advice) for adjustment requests where diagnostic or procedure coding was in error resulting in a change to a higher weighted DRG Adjustments reported by the QIO have no corresponding time limit and are adjusted automatically by the A/B MAC (A) without requiring the hospital to submit an adjustment request |
blend alternative diem portion determined in) and portion in (6,671.84 + $\ *, was in the denominator the 5/6th of (28.0 25 days |
Compute the blend alternative Add the LTC-DRG per diem portion determined in step (1-c) and the IPPS comparable per diem portion determined in step (2-d) $6,671.84 + $4,491.10 $11,162.94 * In this example, 25 days was used in the denominator since the 5/6th ALOS of LTC DRG XYZ (28.0 days) is greater than 25 days |
DenoisingAutoEncoderLossper_device_train_batch_size: 24per_device_eval_batch_size: 24num_train_epochs: 2multi_dataset_batch_sampler: round_robinoverwrite_output_dir: Falsedo_predict: Falseeval_strategy: noprediction_loss_only: Trueper_device_train_batch_size: 24per_device_eval_batch_size: 24per_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: 1num_train_epochs: 2max_steps: -1lr_scheduler_type: linearlr_scheduler_kwargs: {}warmup_ratio: 0.0warmup_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: 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: {'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: 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: Falsehub_revision: Nonegradient_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: Falseliger_kernel_config: Noneeval_use_gather_object: Falseaverage_tokens_across_devices: Falseprompts: Nonebatch_sampler: batch_samplermulti_dataset_batch_sampler: round_robinrouter_mapping: {}learning_rate_mapping: {}| Epoch | Step | Training Loss |
|---|---|---|
| 0.1969 | 500 | 2.3686 |
| 0.3939 | 1000 | 2.1397 |
| 0.5908 | 1500 | 2.0367 |
| 0.7877 | 2000 | 1.9555 |
| 0.9846 | 2500 | 1.9082 |
| 1.1816 | 3000 | 1.6029 |
| 1.3785 | 3500 | 1.5672 |
| 1.5754 | 4000 | 1.5639 |
| 1.7724 | 4500 | 1.5663 |
| 1.9693 | 5000 | 1.5593 |
@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",
}
@inproceedings{wang-2021-TSDAE,
title = "TSDAE: Using Transformer-based Sequential Denoising Auto-Encoderfor Unsupervised Sentence Embedding Learning",
author = "Wang, Kexin and Reimers, Nils and Gurevych, Iryna",
booktitle = "Findings of the Association for Computational Linguistics: EMNLP 2021",
month = nov,
year = "2021",
address = "Punta Cana, Dominican Republic",
publisher = "Association for Computational Linguistics",
pages = "671--688",
url = "https://arxiv.org/abs/2104.06979",
}