SentenceTransformer(
(0): Transformer({'transformer_task': 'feature-extraction', 'modality_config': {'text': {'method': 'forward', 'method_output_name': 'last_hidden_state'}}, 'module_output_name': 'token_embeddings', 'architecture': 'BertModel'})
(1): Pooling({'embedding_dimension': 384, 'pooling_mode': 'mean', 'include_prompt': True})
(2): Normalize({})
)pip install -U sentence-transformers1from sentence_transformers import SentenceTransformer
2
3# Download from the 🤗 Hub
4model = SentenceTransformer("ronit01/golden_rag_tuned_minilm")
5# Run inference
6sentences = [
7 'How do you configure and launch a multi-config RAG evaluation experiment using run_evals(), including defining all required user-provided functions?',
8 'Other Eval Config Knobs\n------\n\nFinally, apart from the Generator, the following knobs can also be included in your eval config dictionary. Each of \nthese can also be a knob set generator, viz., :func:`List()` for a discrete and :func:`Range()` for continuous knobs.\n\nFor more details on the four user-given functions listed below, see :doc:`the API: User-Provided Functions for Run Evals page</evalsfunctions>`.\n\nFor more details on the semantics of the online aggregation strategy arguments listed below, see :doc:`the Online Aggregation for Evals page</onlineagg>`.\n\n\n**batch_size** : int\n\tNumber of examples to process in one batch for GPU efficiency (if applicable)\n\n**preprocess_fn** : Callable\n\tUser-given function to preprocess a batch of examples; an eval config\'s RagSpec and PromptManager are input by the system\n\n**postprocess_fn** : Callable, optional\n\tUser-given function to postprocess a batch of examples and generations; a single cfg is passed as input by the system\n\n**compute_metrics_fn** : Callable\n\tUser-given evaluation function to compute eval metrics per batch\n\n**accumulate_metrics_fn** : Callable, optional\n\tUser-given evaluation function to aggregate algebraic eval metrics across batches. If this is not given, all metrics provided in :code:`eval_compute_metrics_fn` will be assumed to be distributive by default.\n\n**online_strategy_kwargs** : dict[str, Any], optional\n\tParameters for evals online aggregation strategy. The dictionary must include the following keys:\n\t\n\t* :code:`"strategy_name"` (str) - Must be :code:`"normal"`, :code:`"wilson"`, or :code:`"hoeffding"`.\n\t* :code:`"confidence_level"` (float) - Confidence level for confidence intervals on metrics. Must be in [0,1]. Default is 0.95 (95%).\n\t* :code:`"use_fpc"` (bool) - Whether to apply finite population correction. Default is :code:`True`.',
9 '.. code-block:: python\n\n # Based on the FiQA Pinecone tutorial notebook\n spec = ServerlessSpec(cloud="gcp", region="us-central1")\n\n # Create mode\n vector_store_cfg_create={\n "type": "pinecone",\n "pinecone_api_key": PINECONE_API_KEY, # Or set the PINECONE_API_KEY environment variable\n "spec": spec,\n "metric": "cosine",\n "batch_size": 1024, # documents are embedded in batches of 1024. Defaults to 128.\n }\n\n # Read and Update mode\n vector_store_cfg_read_update={\n "type": "pinecone", # Required\n "pinecone_api_key": PINECONE_API_KEY, # Or set the PINECONE_API_KEY environment variable\n "index_namespace": List([("fiqa", "chunk64"), ("fiqa", "chunk256")]), # Names of *pre-existing* pinecone indexes paired with respective namespaces\n "embedding_cfg": {\n "class": HuggingFaceEmbeddings,\n "model_name": "sentence-transformers/all-MiniLM-L6-v2",\n "model_kwargs": {"device": "cuda:0"},\n "encode_kwargs": {"normalize_embeddings": True, "batch_size": 128}\n },\n "text_key": "original_doctext", # Metadata field name for raw text in Pinecone; defaults to "text"\n }\n\n rag_gpu = RFLangChainRagSpec(\n document_loader=DirectoryLoader(\n ...\n ),\n ...\n vector_store_cfg=vector_store_cfg_create, # Using Pinecone in create mode\n )',
10]
11embeddings = model.encode(sentences)
12print(embeddings.shape)
13# [3, 384]
14
15# Get the similarity scores for the embeddings
16similarities = model.similarity(embeddings, embeddings)
17print(similarities)
18# tensor([[1.0000, 0.8252, 0.5741],
19# [0.8252, 1.0000, 0.6055],
20# [0.5741, 0.6055, 1.0000]])sentence_0, sentence_1, and label| sentence_0 | sentence_1 | label | |
|---|---|---|---|
| type | string | string | float |
| details |
|
|
|
| sentence_0 | sentence_1 | label |
|---|---|---|
How do the Stop and Delete IC Ops compare in terms of their effects on a run's state, visibility on the dashboard, resource usage, artifact preservation, and what further IC Ops can be performed on the run afterward? | Delete[object Object]----[object Object][object Object]This IC Op earmarks the run to be deleted from the next chunk onward. [object Object]On the chart, you will see its curves vanish almost immediately. [object Object]You cannot do any further IC Ops on a deleted run because it will not be visible. [object Object]Note that although a deleted run vanishes from the plots, its model checkpoints are still part of [object Object]the artifacts of that experiment so that you have post-hoc audibility.[object Object] | 1.0 |
How does RapidFire AI's approach to multi-config experimentation unify training (run_fit) and evaluation (run_evals) workflows under a common adaptive execution model, and what are the key differences in how each workflow exposes parallelism controls, return values, and user-provided functions? | RFOpenAIAPIModelConfig |
this page <https://platform.openai.com/docs/api-reference/chat/create>__.List valued or
:class:Range valued in an :class:RFOpenAIAPIModelConfig.
That is how you can specify a base set of knob combinations from which a config group can
be produced. Also read :doc:the Multi-Config Specification page</configs>.* :code:`"api_key"`: Your OpenAI API key for authentication. Note that we are NOT able to provide a publicly visible API key.
* :code:`"max_retries"`: Maximum ...</code> | <code>0.0</code> |How do RFvLLMModelConfig and RFOpenAIAPIModelConfig compare in terms of their configuration parameters, underlying systems, rate limiting capabilities, and typical use cases? | RapidFire AI's execution pipeline for RAG pipelines engineering is split into 2 main stages as illustrated in the figure below:
[object Object]
[object Object]
[object Object][object Object] This creates both Document Preprocessing workers and Query Processing workers. Provide :code:[object Object], optional :code:[object Object], :code:[object Object], and optional :code:[object Object]. The document preprocessing w... | 0.0 |ContrastiveLoss with these parameters:1{
2 "distance_metric": "SiameseDistanceMetric.COSINE_DISTANCE",
3 "margin": 0.5,
4 "size_average": true
5}per_device_train_batch_size: 16per_device_eval_batch_size: 16num_train_epochs: 1multi_dataset_batch_sampler: round_robindo_predict: Falseprediction_loss_only: Trueper_device_train_batch_size: 16per_device_eval_batch_size: 16gradient_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: Nonewarmup_ratio: Nonewarmup_steps: 0log_level: passivelog_level_replica: warninglog_on_each_node: Truelogging_nan_inf_filter: Trueenable_jit_checkpoint: Falsesave_on_each_node: Falsesave_only_model: Falserestore_callback_states_from_checkpoint: Falseuse_cpu: Falseseed: 42data_seed: Nonebf16: Falsefp16: Falsebf16_full_eval: Falsefp16_full_eval: Falsetf32: Nonelocal_rank: -1ddp_backend: Nonedebug: []dataloader_drop_last: Falsedataloader_num_workers: 0dataloader_prefetch_factor: Nonedisable_tqdm: Falseremove_unused_columns: Truelabel_names: Noneload_best_model_at_end: Falseignore_data_skip: Falsefsdp: []fsdp_config: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}accelerator_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: Nonegroup_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: Truepush_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_for_metrics: []eval_do_concat_batches: Trueauto_find_batch_size: Falsefull_determinism: Falseddp_timeout: 1800torch_compile: Falsetorch_compile_backend: Nonetorch_compile_mode: Noneinclude_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: Trueuse_cache: Falseprompts: Nonebatch_sampler: batch_samplermulti_dataset_batch_sampler: round_robinrouter_mapping: {}learning_rate_mapping: {}1@inproceedings{reimers-2019-sentence-bert,
2 title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
3 author = "Reimers, Nils and Gurevych, Iryna",
4 booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
5 month = "11",
6 year = "2019",
7 publisher = "Association for Computational Linguistics",
8 url = "https://arxiv.org/abs/1908.10084",
9}1@inproceedings{hadsell2006dimensionality,
2 author={Hadsell, R. and Chopra, S. and LeCun, Y.},
3 booktitle={2006 IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR'06)},
4 title={Dimensionality Reduction by Learning an Invariant Mapping},
5 year={2006},
6 volume={2},
7 number={},
8 pages={1735-1742},
9 doi={10.1109/CVPR.2006.100}
10}