--- language: en license: apache-2.0 tags: - text-generation - mistralai - moe - question-answering - natural-questions base_model: - mistralai/Mixtral-8x7B-v0.1 --- # Mixtral-8x7B MoE Fine-tuned on Natural Questions This model is a fine-tuned version of [MistralAI/Mixtral-8x7B-0.1](https://huggingface.co/mistralai/Mixtral-8x7B-v0.1) on the Natural Questions dataset. ## Model Description - **Base Model**: mistralai/Mixtral-8x7B-0.1 - **Architecture**: Mixture-of-Experts (MoE) variant - **Training Dataset**: Natural Questions (NQ) - annotated for expert routing - **Task**: Question Answering / Text Generation ## Training Details The model was fine-tuned using: - DeepSpeed with ZeRO Stage 2 optimization - HuggingFace Accelerate - Custom MoE expert annotations ## Usage ```python from transformers import AutoTokenizer, AutoModelForCausalLM model_name = "vvijayk/mixtral-8x7b-moe-nq-finetuned" tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained( model_name, trust_remote_code=True, torch_dtype="auto", device_map="auto" ) # Example inference question = "What is the capital of France?" prompt = f"Question: {question}\nAnswer:" inputs = tokenizer(prompt, return_tensors="pt").to(model.device) outputs = model.generate( **inputs, max_new_tokens=128, temperature=0.7, do_sample=True, top_p=0.9, ) answer = tokenizer.decode(outputs[0], skip_special_tokens=True) print(answer) ``` ## Training Configuration Training was performed using the configuration in the repository. See `train_mixtral_8x7b_moe_accelerate.py` for details. ## Limitations and Biases This model inherits limitations and biases from the base Mixtral-8x7B model and the Natural Questions dataset. Users should be aware of potential biases in question-answering outputs. ## Citation If you use this model, please cite: ```bibtex @misc{mixtral-8x7b-moe-nq-finetuned, author = {Vijay Venkatraman}, title = {Mixtral-8x7B-0.1 Fine-tuned on Natural Questions}, year = {2025}, publisher = {HuggingFace}, howpublished = {\url{https://huggingface.co/vvijayk/mixtral-8x7b-moe-nq-finetuned}} } ``` ## Acknowledgements - Base model by Mistral AI - Natural Questions dataset by Google Research - Training infrastructure using DeepSpeed and HuggingFace Accelerate