FLAN-T5 for StrategyQA This repository contains a fine-tuned version of the FLAN-T5 model for the StrategyQA dataset. The model is trained to perform multi-step reasoning and answer complex multi-choice questions, leveraging the knowledge stored in external resources. Model Overview FLAN-T5 (Fine-tuned Language Agnostic T5) is a variant of T5 (Text-to-Text Transfer Transformer) that has been fine-tuned on a wide variety of tasks to improve its ability to generalize across diverse NLP tasks. StrategyQA Dataset StrategyQA is a dataset designed for multi-step reasoning tasks, where each question requires a sequence of logical steps to arrive at the correct answer. It focuses on commonsense reasoning and question answering. This model has been fine-tuned specifically to answer questions from the StrategyQA dataset by retrieving relevant knowledge and reasoning through it. Model Description This model was fine-tuned using the FLAN-T5 architecture on the StrategyQA dataset. The model is designed to answer multi-step reasoning questions by retrieving relevant documents and reasoning over them. Base Model: FLAN-T5 Fine-tuned Dataset: StrategyQA Task: Multi-step reasoning for question answering Retriever Type: Dense retriever (using models like ColBERT or DPR for document retrieval) Intended Use This model is designed to be used for multi-step reasoning tasks and can be leveraged for a variety of question-answering tasks where the answer requires more than one step of reasoning. It's particularly useful for domains like commonsense reasoning, knowledge-intensive tasks, and complex decision-making questions. How to Use To use the model for inference, follow these steps: Installation To install the Hugging Face transformers library and use the model, run the following: bash Copy pip install transformers Example Code You can use the model with the following Python code: python Copy from transformers import T5ForConditionalGeneration, T5Tokenizer # Load the model and tokenizer model_name = "Azaz666/flan-t5-strategyqa" # Replace with your model name if necessary model = T5ForConditionalGeneration.from_pretrained(model_name) tokenizer = T5Tokenizer.from_pretrained(model_name) # Example question question = "What is the capital of France?" # Tokenize the input question input_ids = tokenizer.encode("question: " + question, return_tensors="pt") # Generate the answer outputs = model.generate(input_ids) answer = tokenizer.decode(outputs[0], skip_special_tokens=True) print(f"Answer: {answer}") Model Input/Output Input: The model expects a question in the format question: {your_question_here}. Output: The output is a generated answer based on the reasoning over the retrieved knowledge. Example Input: "What is the capital of France?" Output: "Paris" Model Training Details The model was fine-tuned using the StrategyQA dataset. Here's a brief overview of the training setup: Pre-trained Model: flan-t5-large Training Dataset: StrategyQA Training Steps: The model was fine-tuned on the StrategyQA dataset, which contains questions requiring multiple reasoning steps. Evaluation Metrics: The model performance was evaluated based on accuracy (whether the predicted answer matched the ground truth). Limitations Context Length: The model is limited by the input size, and longer questions or longer passages might be truncated. Generalization: While fine-tuned for multi-step reasoning, performance may vary depending on the complexity of the question. Citation If you use this model or dataset, please cite the following paper: StrategyQA: https://arxiv.org/abs/2004.06364 License This model is licensed under the MIT License.