File size: 4,536 Bytes
3f01731
 
 
 
 
 
 
 
1c3f8db
3f01731
 
 
159d420
fd28c7d
 
65e982d
fd28c7d
159d420
 
 
 
 
 
 
65e982d
159d420
 
 
 
 
65e982d
 
 
159d420
 
 
 
 
 
65e982d
 
 
159d420
 
 
 
65e982d
 
8b6ba3a
 
159d420
 
 
8b6ba3a
 
 
159d420
 
 
 
8b6ba3a
 
 
 
159d420
 
 
8b6ba3a
 
 
159d420
 
 
 
8b6ba3a
 
ff83521
5764a91
 
3f01731
 
 
 
 
 
 
 
a06d1b3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1e151ac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
---
base_model: unsloth/mistral-nemo-base-2407-bnb-4bit
tags:
- text-generation-inference
- transformers
- unsloth
- mistral
- trl
- question-generation
license: apache-2.0
language:
- en
pipeline_tag: text-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
library_name: transformers
---

# 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)