Instructions to use MajidFQ/taxoSplitter_biz-router-e5 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use MajidFQ/taxoSplitter_biz-router-e5 with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("MajidFQ/taxoSplitter_biz-router-e5") sentences = [ "diesel fuel supplier", "RULE: The business operates a physical storefront that sells tangible\n goods directly to individual end consumers who walk in and purchase.\n\n INCLUDES: Clothing stores, footwear stores, department stores,\n general merchandise stores, dollar stores, discount stores, specialty\n retail, home goods stores, furniture stores, flooring stores, mattress\n stores, hardware stores, electronics stores, appliance stores, toy\n stores, book stores, music stores, game stores, sporting goods stores,\n hobby stores, jewelry stores, gift shops, pharmacies, drug stores.\n Grocery stores, supermarkets, health food stores, organic food stores,\n ethnic grocery stores, liquor stores, wine stores. Pet supply stores,\n pet food stores. Camping stores, bicycle shops, outdoor recreation\n stores. Thrift stores, antique stores, pawn shops, consignment shops.\n Gas stations, convenience stores, vape shops, smoke shops.\n\n DOES NOT INCLUDE: B2B wholesalers (D13_Manufacturing). Online-only\n retailers. Restaurants where food is consumed on-site (D07_FoodDining).\n Service businesses that incidentally sell products.", "RULE: The business provides routine or project-based physical\n maintenance, cleaning, security, or restoration of properties.\n They maintain the property — they do not build or renovate it.\n\n INCLUDES: Commercial office cleaning, janitorial services, maid\n services, house cleaning, carpet cleaning, window cleaning, pressure\n washing, air duct cleaning, dryer vent cleaning. Landscaping, lawn\n care, lawn mowing, arborist services, tree trimming, tree removal,\n stump grinding, hedge trimming, leaf blowing, irrigation maintenance.\n Pest control, rodent control, termite treatment. Waste management,\n junk removal, debris removal, garbage collection, septic system\n service, sanitation, portable toilet rental. Fire and water damage\n restoration, mold remediation, chimney sweeps, gutter cleaning and\n repair, drain cleaning, property maintenance services. Snow removal,\n pool cleaning and maintenance. Security guard services, security\n patrol services, alarm monitoring.\n\n DOES NOT INCLUDE: Construction and renovation (D04_Construction).\n Landscaping supply stores (D11_Retail). Manufacturing (D13_Manufacturing).", "RULE: The business provides health, grooming, boarding, or care\n services where the primary patient or client is an animal.\n\n INCLUDES: Veterinarians, animal hospitals, veterinary specialists,\n emergency animal clinics, pet dental care. Dog groomers, cat groomers,\n mobile pet groomers. Dog training, pet obedience schools. Boarding\n kennels, doggy day care, cat boarding, pet sitting services, dog\n walking services. Aquarium maintenance, exotic animal care,\n livestock veterinarians. Pet cremation, animal shelters and rescues.\n\n DOES NOT INCLUDE: Pet supply stores and pet food retail (D11_Retail).\n Animal farms raising livestock for food production (D13_Manufacturing).\n Human healthcare (D01_Healthcare)." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Notebooks
- Google Colab
- Kaggle
TaxoSplitter: Business Router (e5-base)
This is a fine-tuned version of intfloat/e5-base-v2 designed specifically to route raw Point of Interest (POI) and business categories (e.g., from Google Maps, Yelp, or CRM data) into 14 strict B2B sales verticals.
It solves the "Suffix Poisoning" problem inherent in zero-shot embedding models, where generic suffixes (like "station" or "company") overpower the semantic meaning of the core noun.
This is a sentence-transformers model finetuned from intfloat/e5-base-v2. It maps sentences & paragraphs to a 768-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, classification, clustering, and more.
Model Details
- Base Model:
intfloat/e5-base-v2 - Architecture: Sentence Transformer / Feature Extraction
- Dimensions: 768
- Pooling: Mean Pooling
- Training Objective: Contrastive Learning (
CosineSimilarityLoss) - Training Data: 30,345 positive and negative pairs generated from a 120B LLM-grounded dataset.
The 14 Domains
The model is trained to route categories into the following distinct clusters:
Healthcare, PetCare, Automotive, Construction, Cleaning, RealEstate, FoodDining, Lodging, BeautyWellness, FitnessSports, Retail, B2BCorporate, Manufacturing, PublicNonProfit, and ARCHIVE.
Usage (Sentence-Transformers)
pip install -U sentence-transformers
### Model Description
- **Model Type:** Sentence Transformer
- **Base model:** [intfloat/e5-base-v2](https://huggingface.co/intfloat/e5-base-v2) <!-- at revision f52bf8ec8c7124536f0efb74aca902b2995e5bcd -->
- **Maximum Sequence Length:** 512 tokens
- **Output Dimensionality:** 768 dimensions
- **Similarity Function:** Cosine Similarity
- **Supported Modality:** Text
<!-- - **Training Dataset:** Unknown -->
<!-- - **Language:** Unknown -->
<!-- - **License:** Unknown -->
### Model Sources
- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
- **Repository:** [Sentence Transformers on GitHub](https://github.com/huggingface/sentence-transformers)
- **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
### Full Model Architecture
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': 768, 'pooling_mode': 'mean', 'include_prompt': True}) (2): Normalize({}) )
## Usage
### Direct Usage (Sentence Transformers)
First install the Sentence Transformers library:
```bash
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("MajidFQ/taxoSplitter_biz-router-e5")
# Run inference
sentences = [
'veterinarian',
'RULE: The business sells specialized professional knowledge, legal,\n financial, technology, or administrative services — primarily to\n other businesses or sophisticated clients. The deliverable is advice,\n a document, software, or a managed service, not a physical product\n or in-person experience.\n\n INCLUDES: Law firms, attorneys, legal services, notary publics,\n paralegals. Accounting firms, accountants, auditors, tax preparation,\n payroll services, bookkeepers. Financial planners, financial advisors,\n investment services, insurance agencies, banks, credit unions, debt\n collectors. Management consultants, business consultants, HR\n consultants. Marketing agencies, advertising agencies, branding\n agencies, PR firms, SEO agencies, digital agencies. Software\n companies, IT service companies, managed IT providers, cybersecurity\n firms, web hosting, ISPs, data centers, cloud services, tech support.\n Staffing agencies, employment agencies, executive recruiters.\n Architects, engineering consultants (office-based), design firms.\n Private investigators, process servers, court reporters, notaries.\n Commercial printing, sign companies (design and print).\n\n DOES NOT INCLUDE: On-site trade contractors (D04_Construction).\n Government agencies (D14_PublicNonProfit). Hospitals and medical\n practices (D01_Healthcare). Software retail stores (D11_Retail).',
'RULE: The business provides health, grooming, boarding, or care\n services where the primary patient or client is an animal.\n\n INCLUDES: Veterinarians, animal hospitals, veterinary specialists,\n emergency animal clinics, pet dental care. Dog groomers, cat groomers,\n mobile pet groomers. Dog training, pet obedience schools. Boarding\n kennels, doggy day care, cat boarding, pet sitting services, dog\n walking services. Aquarium maintenance, exotic animal care,\n livestock veterinarians. Pet cremation, animal shelters and rescues.\n\n DOES NOT INCLUDE: Pet supply stores and pet food retail (D11_Retail).\n Animal farms raising livestock for food production (D13_Manufacturing).\n Human healthcare (D01_Healthcare).',
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 768]
# Get the similarity scores for the embeddings
similarities = model.similarity(embeddings, embeddings)
print(similarities)
# tensor([[ 1.0000, -0.0284, 0.9810],
# [-0.0284, 1.0000, -0.0252],
# [ 0.9810, -0.0252, 1.0000]])
Training Details
Training Dataset
Unnamed Dataset
- Size: 30,345 training samples
- Columns:
sentence_0,sentence_1, andlabel - Approximate statistics based on the first 100 samples:
sentence_0 sentence_1 label type string string float modality text text details - min: 3 tokens
- mean: 4.69 tokens
- max: 8 tokens
- min: 151 tokens
- mean: 235.07 tokens
- max: 286 tokens
- min: 0.0
- mean: 0.07
- max: 1.0
- Samples:
sentence_0 sentence_1 label building materials marketRULE: The business provides health, grooming, boarding, or care
services where the primary patient or client is an animal.
INCLUDES: Veterinarians, animal hospitals, veterinary specialists,
emergency animal clinics, pet dental care. Dog groomers, cat groomers,
mobile pet groomers. Dog training, pet obedience schools. Boarding
kennels, doggy day care, cat boarding, pet sitting services, dog
walking services. Aquarium maintenance, exotic animal care,
livestock veterinarians. Pet cremation, animal shelters and rescues.
DOES NOT INCLUDE: Pet supply stores and pet food retail (D11_Retail).
Animal farms raising livestock for food production (D13_Manufacturing).
Human healthcare (D01_Healthcare).0.0meditation centerRULE: The entry is not a business — it is a geographic location,
natural feature, public landmark, or abstract term with no
identifiable commercial entity that a B2B sales team could contact.
INCLUDES: Natural features — beaches, rivers, lakes, mountains,
waterfalls, caves, forests, bays, islands, peninsulas, cliffs,
springs, inlets, ridges. Public parks — national parks, state parks,
city parks, nature preserves, wildlife refuges, botanical gardens.
Public infrastructure as places — bridges, dams, canals, highways,
train stations (the physical location, not a transit company).
Purely geographic or civic landmarks — plazas, monuments, scenic
overlooks, historical sites as places (not as museum businesses).
Abstract or overly generic terms with no specific commercial
entity: "services", "industry", "company", "store", "center" alone.
DOES NOT INCLUDE: Businesses operating at natural...0.0gun clubRULE: The business provides overnight accommodation or organized
travel and tourism experiences.
INCLUDES: Hotels, motels, boutique hotels, luxury resorts, beach
resorts, mountain resorts, casino resorts, extended-stay hotels,
bed and breakfasts, hostels, guest houses, inns, lodges, serviced
apartments, vacation rental operators, RV parks, campgrounds,
glamping sites, cabin rentals. Tour operators, travel agencies,
cruise agencies, sightseeing tour companies, boat tour operators,
helicopter tour operators, hot air balloon rides, guided hiking
tours, adventure tourism operators. Airport shuttles and travel
transport services.
DOES NOT INCLUDE: Restaurants and bars (D07_FoodDining). Real estate
managing long-term rentals (D06_RealEstate). Amusement and recreation
venues (D10_FitnessSports).0.0 - Loss:
CosineSimilarityLosswith these parameters:{ "loss_fct": "torch.nn.modules.loss.MSELoss", "cos_score_transformation": "torch.nn.modules.linear.Identity" }
Training Hyperparameters
Non-Default Hyperparameters
per_device_train_batch_size: 16num_train_epochs: 4per_device_eval_batch_size: 16multi_dataset_batch_sampler: round_robin
All Hyperparameters
Click to expand
per_device_train_batch_size: 16num_train_epochs: 4max_steps: -1learning_rate: 5e-05lr_scheduler_type: linearlr_scheduler_kwargs: Nonewarmup_steps: 0optim: adamw_torch_fusedoptim_args: Noneweight_decay: 0.0adam_beta1: 0.9adam_beta2: 0.999adam_epsilon: 1e-08optim_target_modules: Nonegradient_accumulation_steps: 1average_tokens_across_devices: Truemax_grad_norm: 1label_smoothing_factor: 0.0bf16: Falsefp16: Falsebf16_full_eval: Falsefp16_full_eval: Falsetf32: Nonegradient_checkpointing: Falsegradient_checkpointing_kwargs: Nonetorch_compile: Falsetorch_compile_backend: Nonetorch_compile_mode: Noneuse_liger_kernel: Falseliger_kernel_config: Noneuse_cache: Falseneftune_noise_alpha: Nonetorch_empty_cache_steps: Noneauto_find_batch_size: Falselog_on_each_node: Truelogging_nan_inf_filter: Trueinclude_num_input_tokens_seen: nolog_level: passivelog_level_replica: warningdisable_tqdm: Falseproject: huggingfacetrackio_space_id: Nonetrackio_bucket_id: Nonetrackio_static_space_id: Noneper_device_eval_batch_size: 16prediction_loss_only: Trueeval_on_start: Falseeval_do_concat_batches: Trueeval_use_gather_object: Falseeval_accumulation_steps: Noneinclude_for_metrics: []batch_eval_metrics: Falsesave_only_model: Falsesave_on_each_node: Falseenable_jit_checkpoint: Falsepush_to_hub: Falsehub_private_repo: Nonehub_model_id: Nonehub_strategy: every_savehub_always_push: Falsehub_revision: Noneload_best_model_at_end: Falseignore_data_skip: Falserestore_callback_states_from_checkpoint: Falsefull_determinism: Falseseed: 42data_seed: Noneuse_cpu: Falseaccelerator_config: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}parallelism_config: Nonedataloader_drop_last: Falsedataloader_num_workers: 0dataloader_pin_memory: Truedataloader_persistent_workers: Falsedataloader_prefetch_factor: Nonedataloader_multiprocessing_context: Nonedataloader_in_order: Trueremove_unused_columns: Truelabel_names: Nonetrain_sampling_strategy: randomlength_column_name: lengthddp_find_unused_parameters: Noneddp_bucket_cap_mb: Noneddp_broadcast_buffers: Falseddp_static_graph: Noneddp_backend: Noneddp_timeout: 1800fsdp: Nonefsdp_config: Nonedeepspeed: Nonedebug: []skip_memory_metrics: Truedo_predict: Falseresume_from_checkpoint: Nonelocal_rank: -1prompts: Nonebatch_sampler: batch_samplermulti_dataset_batch_sampler: round_robinrouter_mapping: {}learning_rate_mapping: {}warmup_ratio: None
Training Logs
| Epoch | Step | Training Loss |
|---|---|---|
| 0.2636 | 500 | 0.0588 |
| 0.5271 | 1000 | 0.0236 |
| 0.7907 | 1500 | 0.0159 |
| 1.0543 | 2000 | 0.0158 |
| 1.3179 | 2500 | 0.0083 |
| 1.5814 | 3000 | 0.0071 |
| 1.8450 | 3500 | 0.0072 |
| 2.1086 | 4000 | 0.0050 |
| 2.3722 | 4500 | 0.0037 |
| 2.6357 | 5000 | 0.0024 |
| 2.8993 | 5500 | 0.0025 |
| 3.1629 | 6000 | 0.0019 |
| 3.4265 | 6500 | 0.0014 |
| 3.6900 | 7000 | 0.0010 |
| 3.9536 | 7500 | 0.0015 |
Training Time
- Training: 2.1 hours
Framework Versions
- Python: 3.13.15
- Sentence Transformers: 5.7.0
- Transformers: 5.16.1
- PyTorch: 2.11.0+cu128
- Accelerate: 1.14.0
- Datasets: 4.0.0
- Tokenizers: 0.23.1
Additional Resources
- Training and Finetuning Embedding Models with Sentence Transformers: the end-to-end guide for training or finetuning Sentence Transformer models.
- Introduction to Matryoshka Embedding Models: variable-size embeddings that can be truncated with minimal quality loss.
- Binary and Scalar Embedding Quantization for Significantly Faster & Cheaper Retrieval: post-training compression of embedding vectors.
- Multimodal Embedding & Reranker Models with Sentence Transformers: use text, image, audio, and video models through the same API.
- Training and Finetuning Multimodal Embedding & Reranker Models with Sentence Transformers: train multimodal embedding models, with a Visual Document Retrieval walkthrough.
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",
}
- Downloads last month
- 92
Model tree for MajidFQ/taxoSplitter_biz-router-e5
Base model
intfloat/e5-base-v2