metadata
tags:
- sentence-transformers
- sentence-similarity
- feature-extraction
- dense
- generated_from_trainer
- dataset_size:1000
- loss:TripletLoss
base_model: sentence-transformers/all-MiniLM-L6-v2
widget:
- source_sentence: What are the key points in passage fam_402.10_30?
sentences:
- >-
( v ) A dependent applying under [ paragraph ( s)(2 ) ( iii)](/current /
title-8 / section-214.2#p-214.2(s)(2)(iii ) ) or [ ( iv)](/current /
title-8 / section-214.2#p-214.2(s)(2)(iv ) ) of this section must also
submit a certified statement from the post - secondary educational
institution confirming that he or she is pursuing studies on a full -
time basis .
- |-
( b ) ( U ) The criteria for
qualifying as an H-1B physician are found in subparagraph 3 below .
- ( ii ) * What are the requirements for participation ? *
- source_sentence: What are the key points in passage 8cfr_214.3_93?
sentences:
- >-
( vii ) Whether the student has been certified for practical training ,
and the beginning and end dates of certification .
- ( D ) Similarity of jobs and working conditions ;
- ( ii ) * What are the requirements for participation ? *
- source_sentence: Explain the significance of passage fam_402_62.
sentences:
- >-
( * i * ) Has competency in oral and written English which shall be
demonstrated by the passage of the English language proficiency test
given by the Educational Commission for Foreign Medical Graduates ; or
- |-
Derivative beneficiaries are entitled to apply for visas to
follow and/or join principals who are maintaining status in the United States ,
even when the principal was never issued a visa in the classification being
sought by the dependent . Take , for instance , a world - class soccer player , who
changes their status from F-1 to O-1 . The spouse and/or children are entitled
to apply for nonimmigrant O-3 visas . Typical documentation for establishing
entitlement to visas in such an instance might include marriage and birth
certificates for the spouse and dependent(s ) , a copy of the principal
beneficiary 's approval notice , and any Form I-797 , Notice of Action notices
relating to the dependents ' own change of status filings . Another example
would be a foreign national who entered the United States on a B-1 visa and
subsequently changed status to F-1 . The spouse and/or child of the F-1 would
be entitled to seek F-2 visas . In such cases , the dependent would need to
present a properly endorsed Form I-20 , Certificate of Eligibility for
Nonimmigrant ( F-1 ) Student Status - for Academic and Language Students , as
evidence that the principal is enrolled , or will be enrolled within 60 days , in
a full course of study or is in approved practical training .
- >-
( 1 ) Meaning of term * Designated Official . * As used in [ § §
214.2(f)](/current / title-8 / section-214.2#p-214.2(f ) ) and [ (
m)](/current / title-8 / section-214.2#p-214.2(m ) ) , [ 214.3](/current
/ title-8 / section-214.3 ) and [ 214.4](/current / title-8 /
section-214.4 ) , a * Designated Official , Designated School Official (
DSO ) , * or * Principal Designated School Official ( PDSO ) , * means a
regularly employed member of the school administration whose office is
located at the school and whose compensation does not come from
commissions for recruitment of foreign students . An individual whose
principal obligation to the school is to recruit foreign students for
compensation does not qualify as a designated official . The PDSO and
any other DSO must be named by the president , owner , or head of a
school or school system . The PDSO and DSO may not delegate this
designation to any other person .
- source_sentence: What is the main topic of passage fam_402.9_141?
sentences:
- |-
( 1 ) The title of the position to which the applicant
is destined , its place in the firm 's organizational structure , the duties
of the position , the degree to which the applicant will have ultimate control
and responsibility for the firm 's overall operations or a major component
thereof , the number and skill levels of the employees the applicant will
supervise , the level of pay , and whether the applicant possesses qualifying
executive or supervisory experience ;
- >-
describes methods of oversight and supervision . The Form I-983 must
explain how the training is directly related to the student 's
qualifying STEM degree .
- >-
( A ) A nurse who is granted H-1C classification based on passage of the
CGFNS examination must , upon admission to the United States , be able
to obtain temporary licensure or other temporary authorization to
practice as a registered nurse from the State Board of Nursing in the
state of intended employment .
- source_sentence: Explain the significance of passage uscis_pm_volume_2_part_f_chapter_7_1.
sentences:
- ( C ) A common formal code of doctrine and discipline ;
- >-
( * i * ) Has competency in oral and written English which shall be
demonstrated by the passage of the English language proficiency test
given by the Educational Commission for Foreign Medical Graduates ; or
- Chapter 7 - Absences From the United States | USCIS
pipeline_tag: sentence-similarity
library_name: sentence-transformers
SentenceTransformer based on sentence-transformers/all-MiniLM-L6-v2
This is a sentence-transformers model finetuned from sentence-transformers/all-MiniLM-L6-v2. It maps sentences & paragraphs to a 384-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: sentence-transformers/all-MiniLM-L6-v2
- Maximum Sequence Length: 256 tokens
- Output Dimensionality: 384 dimensions
- Similarity Function: Cosine Similarity
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': 256, 'do_lower_case': False, 'architecture': 'BertModel'})
(1): Pooling({'word_embedding_dimension': 384, '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-transformers
Then you can load this model and run inference.
from sentence_transformers import SentenceTransformer
# Download from the 🤗 Hub
model = SentenceTransformer("vayishu/visa-minilm")
# Run inference
sentences = [
'Explain the significance of passage uscis_pm_volume_2_part_f_chapter_7_1.',
'Chapter 7 - Absences From the United States | USCIS',
'( * i * ) Has competency in oral and written English which shall be demonstrated by the passage of the English language proficiency test given by the Educational Commission for Foreign Medical Graduates ; or',
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 384]
# Get the similarity scores for the embeddings
similarities = model.similarity(embeddings, embeddings)
print(similarities)
# tensor([[1.0000, 0.3954, 0.4014],
# [0.3954, 1.0000, 0.1409],
# [0.4014, 0.1409, 1.0000]])
Training Details
Training Dataset
Unnamed Dataset
- Size: 1,000 training samples
- Columns:
sentence_0,sentence_1, andsentence_2 - Approximate statistics based on the first 1000 samples:
sentence_0 sentence_1 sentence_2 type string string string details - min: 14 tokens
- mean: 20.62 tokens
- max: 30 tokens
- min: 5 tokens
- mean: 74.9 tokens
- max: 256 tokens
- min: 14 tokens
- mean: 48.16 tokens
- max: 143 tokens
- Samples:
sentence_0 sentence_1 sentence_2 Explain the significance of passage 8cfr_214.1_85.# # # # § 214.1 Requirements for admission , extension , and maintenance of status .( * 5 * ) Evidence of the alien 's original scientific , scholarly , or business - related contributions of major significance in the field ;Can you summarize the content of passage 8cfr_214.2_1843?( C ) A common formal code of doctrine and discipline ;The Office of the Federal Register publishes documents on behalf of Federal agencies but does not have any authority over their programs . We recommend you directly contact the agency associated with the content in question .What is the main topic of passage uscis_pm_volume_2_part_f_chapter_5_85?If the Form I-765 for the STEM OPT extension is denied and the student 's post - completion OPT EAD is expired , OPT employment authorization ends on the date of the decision and the student 's F-1 status ends 60 days after the date of denial . If the Form I-765 for the STEM OPT extension is denied and the student 's post - completion OPT EAD is unexpired , the student will remain employment authorized until the expiration date of the EAD .( A ) A nurse who is granted H-1C classification based on passage of the CGFNS examination must , upon admission to the United States , be able to obtain temporary licensure or other temporary authorization to practice as a registered nurse from the State Board of Nursing in the state of intended employment . - Loss:
TripletLosswith these parameters:{ "distance_metric": "TripletDistanceMetric.EUCLIDEAN", "triplet_margin": 5 }
Training Hyperparameters
Non-Default Hyperparameters
per_device_train_batch_size: 32per_device_eval_batch_size: 32num_train_epochs: 1multi_dataset_batch_sampler: round_robin
All Hyperparameters
Click to expand
overwrite_output_dir: Falsedo_predict: Falseeval_strategy: noprediction_loss_only: Trueper_device_train_batch_size: 32per_device_eval_batch_size: 32per_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: 1max_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}deepspeed: 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: {}
Framework Versions
- Python: 3.12.11
- Sentence Transformers: 5.1.0
- Transformers: 4.55.2
- PyTorch: 2.8.0+cu128
- Accelerate: 1.10.0
- Datasets: 4.0.0
- Tokenizers: 0.21.4
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",
}
TripletLoss
@misc{hermans2017defense,
title={In Defense of the Triplet Loss for Person Re-Identification},
author={Alexander Hermans and Lucas Beyer and Bastian Leibe},
year={2017},
eprint={1703.07737},
archivePrefix={arXiv},
primaryClass={cs.CV}
}