transformers safetensors text-generation-inference unsloth mistral trl question-generation text-generation en license:apache-2.0 endpoints_compatible region:us
---
base_model: unsloth/mistral-nemo-base-2407-bnb-4bit
language:
- en
library_name: transformers
license: apache-2.0
pipeline_tag: text-generation
tags:
- text-generation-inference
- transformers
- unsloth
- mistral
- trl
- question-generation
inference: true
framework: pytorch
widgets:
- inputs:
    instruction: Generate a multiple-choice question (MCQ) based on the passage, provide
      options, and indicate the correct option.
    context: Photosynthesis is the process by which plants convert sunlight into energy.
  outputs:
    question: What is the primary process by which plants convert sunlight into energy?
    options:
    - A. Photosynthesis
    - B. Respiration
    - C. Fermentation
    - D. Transpiration
    correct_option: A
  example_title: MCQ Question Generation
- inputs:
    instruction: Generate a multiple-choice question (MCQ) based on the passage, provide
      options, and indicate the correct option.
    context: Cellular respiration is a metabolic process that converts nutrients into
      ATP, the energy currency of the cell.
  outputs:
    question: What is the main purpose of cellular respiration?
    options:
    - A. Converting nutrients into ATP
    - B. Producing oxygen
    - C. Generating heat
    - D. Breaking down proteins
    correct_option: A
  example_title: Cellular Respiration MCQ
- inputs:
    instruction: Generate a multiple-choice question (MCQ) based on a historical passage
    context: The Industrial Revolution began in Great Britain in the late 18th century,
      transforming manufacturing processes through mechanization.
  outputs:
    question: Where did the Industrial Revolution primarily originate?
    options:
    - A. United States
    - B. France
    - C. Great Britain
    - D. Germany
    correct_option: C
  example_title: Industrial Revolution MCQ
- inputs:
    instruction: Generate a multiple-choice question about environmental science
    context: Biodiversity refers to the variety of life forms within a given ecosystem,
      including genetic, species, and ecological diversity.
  outputs:
    question: What does biodiversity encompass?
    options:
    - A. Only plant species
    - B. Genetic, species, and ecological diversity
    - C. Only animal populations
    - D. Human interactions with nature
    correct_option: B
  example_title: Biodiversity MCQ
---

# Uploaded  model

- **Developed by:** kanoza
- **License:** apache-2.0
- **Finetuned from model :** unsloth/mistral-nemo-base-2407-bnb-4bit

This mistral model was trained 2x faster with [Unsloth](https://github.com/unslothai/unsloth) and Huggingface's TRL library.

# Mistral Nemo MCQ Question Generator

## Overview
A fine-tuned Mistral Nemo model specializing in generating multiple-choice questions (MCQs) across various domains.

## Model Details
- **Base Model**: Mistral Nemo Base 2407
- **Fine-Tuning**: LoRA with 4-bit quantization
- **Training Dataset**: SciQ
- **Primary Task**: Automated MCQ Generation

## Key Features
- Scientific domain question generation
- Supports multiple context types
- High-quality, contextually relevant options
- Configurable question complexity

## Installation
```python
pip install transformers unsloth
from transformers import AutoModelForCausalLM, AutoTokenizer

model = AutoModelForCausalLM.from_pretrained("path/to/model")
tokenizer = AutoTokenizer.from_pretrained("path/to/model")
```

## Usage Example
```python
def generate_mcq(context, instruction):
    prompt = f"""
    Instruction: {instruction}
    Context: {context}
    """
    inputs = tokenizer(prompt, return_tensors="pt")
    outputs = model.generate(**inputs, max_new_tokens=128)
    return tokenizer.decode(outputs[0])

# Example application
context = "Photosynthesis converts sunlight into plant energy."
mcq = generate_mcq(context, "Create a multiple-choice question")
print(mcq)
```

## Performance Metrics
- BERTScore F1: [Placeholder]
- ROUGE-1 F1: [Placeholder]
- Generation Accuracy: [Placeholder]

## Limitations
- Primarily trained on scientific content
- Requires careful prompt engineering
- Potential bias in question generation

## Ethical Considerations
- Intended for educational research
- Users should verify generated content

## License
Apache 2.0

## Contributing
Contributions welcome! Please open issues/PRs on GitHub.

[<img src="https://raw.githubusercontent.com/unslothai/unsloth/main/images/unsloth%20made%20with%20love.png" width="200"/>](https://github.com/unslothai/unsloth)