albert-squad-v2
abhilash1910
Pregunta y respuesta
Abhilash1910/albert-squad-v2 es un modelo de preguntas y respuestas basado en la biblioteca Transformers de Hugging Face. Este modelo utiliza la arquitectura ALBERT y está entrenado en el dataset SQuAD v2.
Como usar
Para utilizar este modelo para preguntas y respuestas, siga las instrucciones a continuación:
from transformers import AutoTokenizer, AutoModelForQuestionAnswering
tokenizer = AutoTokenizer.from_pretrained('abhilash1910/albert-squad-v2')
model = AutoModelForQuestionAnswering.from_pretrained('abhilash1910/albert-squad-v2')
inputs = tokenizer('Where do I live?', 'My name is Wolfgang and I live in Berlin', add_special_tokens=True, return_tensors='pt')
outputs = model(**inputs)
Ejemplo de contexto y pregunta:
[
{"text": "Where do I live?", "context": "My name is Wolfgang and I live in Berlin"},
{"text": "Where do I live?", "context": "My name is Sarah and I live in London"},
{"text": "What's my name?", "context": "My name is Clara and I live in Berkeley."},
{"text": "Which name is also used to describe the Amazon rainforest in English?", "context": "The Amazon rainforest (Portuguese: Floresta Amazônica or Amazônia; Spanish: Selva Amazónica, Amazonía or usually Amazonia; French: Forêt amazonienne; Dutch: Amazoneregenwoud), also known in English as Amazonia or the Amazon Jungle, is a moist broadleaf forest that covers most of the Amazon basin of South America. This basin encompasses 7,000,000 square kilometres (2,700,000 sq mi), of which 5,500,000 square kilometres (2,100,000 sq mi) are covered by the rainforest. This region includes territory belonging to nine nations. The majority of the forest is contained within Brazil, with 60% of the rainforest, followed by Peru with 13%, Colombia with 10%, and with minor amounts in Venezuela, Ecuador, Bolivia, Guyana, Suriname and French Guiana. States or departments in four nations contain 'Amazonas' in their names. The Amazon represents over half of the planet's remaining rainforests, and comprises the largest and most biodiverse tract of tropical rainforest in the world, with an estimated 390 billion individual trees divided into 16,000 species."}
]
Funcionalidades
- Modelo de preguntas y respuestas
- Basado en la arquitectura ALBERT
- Entrenado en el dataset SQuAD v2
- Compatibilidad con PyTorch
- Uso de Safetensors
Casos de uso
- Respuestas automáticas a preguntas formuladas en lenguaje natural
- Desarrollo de sistemas de atención al cliente
- Asistentes virtuales
- Sistemas educativos interactivos