Snivellus789/router-embedding-tuned

Snivellus789
Similitud de oraciones

Este es un modelo de transformadores-de-oraciones ajustado a partir de BAAI/bge-small-en-v1.5. Mapea frases y párrafos a un espacio vectorial denso de 384 dimensiones y se puede usar para similitud textual semántica, búsqueda semántica, minería de paráfrasis, clasificación de texto, agrupación y más.

Como usar

Para usar este modelo, primero instale la biblioteca Sentence Transformers:

pip install -U sentence-transformers

Luego puede cargar este modelo y ejecutar inferencias:

from sentence_transformers import SentenceTransformer

# Descarga desde el 🤗 Hub
model = SentenceTransformer("Snivellus789/router-embedding-tuned")
# Ejecuta inferencia
sentences = [
    'In Swift, what function can I use to shorten the sentence "I\'m feeling kind of tired after having worked all day" while maintaining the same meaning and tone? Can you provide an example of the shortened sentence using the function? ',
    'Convert the given XML code to JSON code. \n \n \n Sample data \n Text \n 123 \n \n \n ',
    'How can I create a C# program that generates a travel itinerary based on user preferences and available destinations? The program should take into account factors such as budget, time of year, and desired activities (such as hiking or sightseeing). Please use the following data format to represent the available destinations:\n```csharp\nList destinations = new List \n{\n    new Destination\n    {\n        Name = "Paris",\n        Country = "France",\n        Activities = new List {"sightseeing", "shopping", "museums"},\n        Cost = 5000,\n        Season = "spring"\n    },\n    new Destination\n    {\n        Name = "Tokyo",\n        Country = "Japan",\n        Activities = new List {"sightseeing", "food", "temples"},\n        Cost = 8000,\n        Season = "fall"\n    },\n    new Destination\n    {\n        Name = "Sydney",\n        Country = "Australia",\n        Activities = new List {"beaches", "hiking", "wildlife"},\n        Cost = 7000,\n        Season = "summer"\n    },\n    new Destination\n    {\n        Name = "Marrakesh",\n        Country = "Morocco",\n        Activities = new List {"sightseeing", "shopping", "food"},\n        Cost = 4000,\n        Season = "winter"\n    }\n};\npublic class Destination\n{\n    public string Name { get; set; }\n    public string Country { get; set; }\n    public List Activities { get; set; }\n    public int Cost { get; set; }\n    public string Season { get; set; }\n}\n```\nPlease provide step-by-step instructions for using the program and any necessary inputs. '
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 384]

# Obtener las puntuaciones de similitud para las incrustaciones
similarities = model.similarity(embeddings, embeddings)
print(similarities.shape)
# [3, 3]

Funcionalidades

Modelo de Transformadores de Oraciones
Modelo base: BAAI/bge-small-en-v1.5
Longitud máxima de secuencia: 512 tokens
Dimensionalidad de salida: 384 tokens
Función de similitud: Similitud de coseno

Casos de uso

Similitud textual semántica
Búsqueda semántica
Minería de paráfrasis
Clasificación de texto
Agrupación de texto