Sentence Similarity
sentence-transformers
Safetensors
distilbert
feature-extraction
Generated from Trainer
dataset_size:203501
loss:TripletLoss
text-embeddings-inference
Instructions to use the-token-architects/distilbert-triplet with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use the-token-architects/distilbert-triplet with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("the-token-architects/distilbert-triplet") sentences = [ "at the county level of government in california power is held by", "\"Hunger Strike\" was written by vocalist Chris Cornell. It features a duet between Cornell and vocalist Eddie Vedder. Cornell was having trouble with the vocals at practice, when Vedder stepped in. Cornell later said \"he sang half of that song not even knowing that I'd wanted the part to be there and he sang it exactly the way I was thinking about doing it, just instinctively.\" \"Hunger Strike\" became Temple of the Dog's breakout single; it was also Vedder's first featured vocal on a record.", "On January 4, 1850, the California constitutional committee recommended the formation of 18 counties. They were Benicia, Butte, Fremont, Los Angeles, Mariposa, Monterey, Mount Diablo, Oro, Redding, Sacramento, San Diego, San Francisco, San Joaquin, San Jose, San Luis Obispo, Santa Barbara, Sonoma, and Sutter. On April 22, the counties of Branciforte, Calaveras, Coloma, Colusi, Marin, Mendocino, Napa, Trinity, and Yuba were added. Benicia was renamed Solano, Coloma to El Dorado, Fremont to Yolo, Mt. Diablo to Contra Costa, San Jose to Santa Clara, Oro to Tuolumne, and Redding to Shasta. One of the first state legislative acts regarding counties was to rename Branciforte County to Santa Cruz, Colusi to Colusa, and Yola to Yolo. The last county in California to be established is Imperial County on August 7, 1907.", "The basic political subdivision of California are the 58 counties. The county government provides countywide services such as law enforcement, jails, elections and voter registration, vital records, property assessment and records, tax collection, public health, health care, social services, libraries, flood control, fire protection, animal control, agricultural regulations, building inspections, ambulance services, and education departments in charge of maintaining statewide standards. In addition the county serves as the local government for all unincorporated areas (those areas not within any incorporated city), providing services such as police, parks, street maintenance, land use regulations, zoning, and waste disposal. Counties have taxing and police powers. Counties may promulgate ordinances which are usually codified in a county code, and violations of the ordinances are misdemeanor crimes unless otherwise specified as an infraction." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Notebooks
- Google Colab
- Kaggle
Welcome to the community
The community tab is the place to discuss and collaborate with the HF community!