Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks
Paper • 1908.10084 • Published • 19
How to use mohitdeharkar/warp_fine_tuned_bge_m3 with sentence-transformers:
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("mohitdeharkar/warp_fine_tuned_bge_m3")
sentences = [
"Marketing with TikTok",
"In this Specialization, we show you techniques to increase price realization and maximize profits. Learn from Boston Consulting Group's global pricing experts and University of Virginia Darden School of Business faculty, who share the frameworks, tips and tools we use in our business and research environments. We will look at pricing through BCG's proprietary and time-tested three “lenses”—cost and economics, customer value, and competition—to build your understanding of the strategic power of pricing. You’ll leave the Specialization with a portfolio-building presentation that demonstrates your ability to price strategically.\nApplied Learning Project\nUtilizing the concepts, tools and techniques taught in each course—from basic techniques of economics to knowledge of customer segments, willingness to pay, and customer decision making to analysis of market prices, share, and industry dynamics—you will practice setting profit maximizing prices to improve price realization in a variety of real-world scenarios. \n Beginner",
"This program is for anyone asking, “Is TikTok right for my business?” In the first course, Understanding TikTok and Its Users, you’ll be introduced to the TikTok platform, including who’s on it and what they’re creating. Then in the second course, Marketing on TikTok, you'll learn how businesses use TikTok, how they tailor content to the platform, and how they find an audience. In the final course, Advertising and E-commerce on TikTok, you’ll learn how to create a marketing strategy for TikTok, how to create advertising campaigns, how to promote and sell products via organic and e-commerce channels like Shopify, and how to use analytics to inform future marketing strategies. Throughout the program, you will have the chance to create your own videos, as well as engage with what other businesses are doing by studying various TikTok accounts in order to get inspiration and insight for your own future interactions with TikTok.\nBy the end of this program, you will be able to: \nCreate fun and engaging TikTok videos\nUnderstand how TikTok fits into your business’s marketing strategy\nArticulate how a number of different businesses use TikTok\nCreate original content using hashtags, trends, filters, and more\nBuild and maintain a brand presence on TikTok\nCreate a content calendar\nUtilize TikTok Ads Manager to create and execute a campaign\nSet up e-commerce integration into your TikTok account\nAnalyze data from your efforts to inform your future content strategy\n\nApplied Learning Project\nLearners will practice creating advertisements on TikTok through guided simulations. These simulations recreate the TikTok advertising platform and allow learners to engage with the platform in a practice environment before creating ads with their own accounts.\n Beginner",
"In this course, you will explore the foundations upon which modern-day ESG was built, how market forces react to ESG, and ways to create and maintain value using ESG investment strategies. You will also learn about the five pathways of materiality, and how those interplay with or against ESG performance.\nYou will examine the many challenges that corporations face when it comes to leveraging ESG investing into their portfolios, and how the changing landscape of ESG is making this an area of untapped potential when it comes to the financial workings of businesses today. You'll also learn from real-life case studies how you can assess risk, create better risk management policy, and build a map to identify valuable areas of opportunity and create better decision-making approaches. Lastly, you will look at portfolio optimization and the utilization of ESG factors to maximize returns in addition to examining different funds, their fee structures, and how investors can blend ESG into their investment portfolio.\n\nBy the end of this course, you will know the best practices for creating a solid risk management plan and how to create a culture that is sensitive to ESG. You will better understand the history and framework behind ESG, and how to create a path forward using smarter methods to identify risk, navigate ESG issues, and reach ESG investing goals.\n Intermediate"
]
embeddings = model.encode(sentences)
similarities = model.similarity(embeddings, embeddings)
print(similarities.shape)
# [4, 4]This is a sentence-transformers model finetuned from manu/bge-m3-custom-fr. 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': 8192, 'do_lower_case': False}) with Transformer model: XLMRobertaModel
(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})
(2): Normalize()
)
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 = [
'Machine Learning Engineering for Production (MLOps)',
"Understanding machine learning and deep learning concepts is essential, but if you’re looking to build an effective AI career, you need production engineering capabilities as well. \nEffectively deploying machine learning models requires competencies more commonly found in technical fields such as software engineering and DevOps. Machine learning engineering for production combines the foundational concepts of machine learning with the functional expertise of modern software development and engineering roles. \nThe Machine Learning Engineering for Production (MLOps) Specialization covers how to conceptualize, build, and maintain integrated systems that continuously operate in production. In striking contrast with standard machine learning modeling, production systems need to handle relentless evolving data. Moreover, the production system must run non-stop at the minimum cost while producing the maximum performance. In this Specialization, you will learn how to use well-established tools and methodologies for doing all of this effectively and efficiently.\nIn this Specialization, you will become familiar with the capabilities, challenges, and consequences of machine learning engineering in production. By the end, you will be ready to employ your new production-ready skills to participate in the development of leading-edge AI technology to solve real-world problems.\nApplied Learning Project\nBy the end, you'll be ready to\n• Design an ML production system end-to-end: project scoping, data needs, modeling strategies, and deployment requirements\n• Establish a model baseline, address concept drift, and prototype how to develop, deploy, and continuously improve a productionized ML application\n• Build data pipelines by gathering, cleaning, and validating datasets\n• Implement feature engineering, transformation, and selection with TensorFlow Extended\n• Establish data lifecycle by leveraging data lineage and provenance metadata tools and follow data evolution with enterprise data schemas\n• Apply techniques to manage modeling resources and best serve offline/online inference requests\n• Use analytics to address model fairness, explainability issues, and mitigate bottlenecks\n• Deliver deployment pipelines for model serving that require different infrastructures\n• Apply best practices and progressive delivery techniques to maintain a continuously operating production system\n Advanced",
'Este certificado de cinco cursos, desenvolvido pelo Google, inclui um currículo inovador projetado para prepará-lo para uma função de nível básico em suporte de TI. Uma posição na área de TI pode ser um serviço de apoio pessoalmente ou remoto em uma pequena empresa ou em uma empresa global como o Google. Se você já lida com TI por algum tempo, ou é novo no campo, você veio ao lugar certo. O programa faz parte do Cresça com o Google, uma iniciativa do Google para ajudar a criar oportunidades econômicas.\nAtravés de uma mistura de palestras em vídeo, questionários e laboratórios e widgets práticos, o programa apresentará soluções de problemas e atendimento ao cliente, redes, sistemas operacionais, administração de sistemas e segurança. Ao longo do caminho, você aprenderá de Googlers com históricos exclusivos cuja base no suporte de TI serviu como um ponto de partida para suas carreiras.\nAo dedicar 5 horas por semana, você pode concluir o certificado em cerca de seis meses. Você pode pular o conteúdo que já sabe e fazer mais cedo os exames de avaliação.\nO conteúdo do Certificado Profissional de Suporte em TI do Google está sob a Licença Internacional de Atribuição 4.0 da Creative Commons.\n75% dos alunos que obtêm os Certificados do Google nos Estados Unidos relatam uma melhora em suas carreiras dentro de um intervalo de 6 meses após a obtenção da certificação.\nFonte: *baseado nas respostas de pesquisa com os graduados pelo programa, Estados Unidos, 2021\nApplied Learning Project\nEste certificado de cinco cursos, desenvolvido pelo Google, inclui um currículo inovador projetado para prepará-lo para uma função de nível básico em suporte de TI. Uma posição na área de TI pode ser um trabalho de serviço de apoio em pessoa ou remoto em uma pequena empresa ou em uma empresa global como o Google. Se você já lida com TI por algum tempo, ou é novo no campo, você veio ao lugar certo. O programa faz parte do Grow with Google, uma iniciativa do Google para ajudar a criar oportunidades econômicas.\n Beginner',
]
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]
sentence_0, sentence_1, and label| sentence_0 | sentence_1 | label | |
|---|---|---|---|
| type | string | string | float |
| details |
|
|
|
| sentence_0 | sentence_1 | label |
|---|---|---|
AI Applications in Marketing and Finance |
In this course, you will learn about AI-powered applications that can enhance the customer journey and extend the customer lifecycle. You will learn how this AI-powered data can enable you to analyze consumer habits and maximize their potential to target your marketing to the right people. You will also learn about fraud, credit risks, and how AI applications can also help you combat the ever-challenging landscape of protecting consumer data. You will also learn methods to utilize supervised and unsupervised machine learning to enhance your fraud detection methods. You will also hear from leading industry experts in the world of data analytics, marketing, and fraud prevention. By the end of this course, you will have a substantial understanding of the role AI and Machine Learning play when it comes to consumer habits, and how we are able to interact and analyze information to increase deep learning potential for your business. |
1.0 |
Business Strategies for A Better World |
In this Specialization, you’ll develop basic literacy in the language of business, which you can use to transition to a new career, start or improve your own small business, or apply to business school to continue your education. In five courses, you’ll learn the fundamentals of marketing, accounting, operations, and finance. In the final Capstone Project, you’ll apply the skills learned by developing a go-to-market strategy to address a real business challenge. |
1.0 |
Financial Acumen for Non-Financial Managers |
In Finance for Technical Managers, you will explore the fundamental principles of financial management. Topics include understanding and interpreting a company’s financial statements, the time value of money and its role in evaluating the economic viability of different projects, and the annual capital budgeting process every company performs when selecting which projects to fund. In addition, you will cover some highly practical topics, such as how to determine product costs, establishing a department’s annual budget, and ways of forecasting future sales. As a side benefit, the quantitative skills you will learn for business are identical to the skills necessary to manage your own personal finances. Therefore, you will extend your analyses to cover investing of mutual funds composed of stocks and bonds, and you will explore the fascinating area of asset allocation. |
1.0 |
CosineSimilarityLoss with these parameters:{
"loss_fct": "torch.nn.modules.loss.MSELoss"
}
per_device_train_batch_size: 4per_device_eval_batch_size: 4num_train_epochs: 2fp16: Truemulti_dataset_batch_sampler: round_robinoverwrite_output_dir: Falsedo_predict: Falseeval_strategy: noprediction_loss_only: Trueper_device_train_batch_size: 4per_device_eval_batch_size: 4per_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: 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}deepspeed: Nonelabel_smoothing_factor: 0.0optim: adamw_torchoptim_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: Falsegradient_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: Nonedispatch_batches: Nonesplit_batches: Noneinclude_tokens_per_second: Falseinclude_num_input_tokens_seen: Falseneftune_noise_alpha: Noneoptim_target_modules: Nonebatch_eval_metrics: Falseeval_on_start: Falseuse_liger_kernel: Falseeval_use_gather_object: Falseaverage_tokens_across_devices: Falseprompts: Nonebatch_sampler: batch_samplermulti_dataset_batch_sampler: round_robin| Epoch | Step | Training Loss |
|---|---|---|
| 2.0 | 500 | 0.013 |
@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",
}
Base model
manu/bge-fr-en