transformers safetensors mistral text-generation en dataset:ibleducation/ibl-khanacademy-transcripts license:mit autotrain_compatible endpoints_compatible text-generation-inference region:us
---
license: mit
datasets:
- ibleducation/ibl-khanacademy-transcripts
language:
- en
library_name: transformers
---

# ibleducation/ibl-neural-edu-tutor-7B
ibleducation/ibl-neural-edu-tutor-7B is a model finetuned on top of mistralai/Mistral-7B-v0.1


The model is finetuned to generate an interractive and descriptive tutorial to students when asked about a topic. The model assumes a human friendly approach 
providing a narative explanation of the concept. 

## Example Conversations
1. Question:  Information Theory \
   Answer:
   ```code
   So I'm gonna talk about information theory, which is a way of thinking about information. And it was developed by Claude Shannon, who was a mathematician and an electrical engineer. And it was developed in the 1940s, and it was really to think about how to transmit information over a channel. So how to transmit information over a channel. And the channel could be a wire, it could be a radio wave, it could be a satellite, it could be a bunch of other things. But the idea is how do you transmit information over it. And the information could be a bunch of different things. It could be a bunch of ones and zeros, it could be a bunch of words, it could be a bunch of pictures. And so the whole idea of information theory is how do you transmit it in a way that it's not corrupted, that it's not lost, and that it's as efficient as possible. And so the way that we think about it is we think about the source of the information, and then we think about the channel, and then we think about the receiver. And the receiver is the thing that's going to receive the information and then do something with it. And so the way that we think about it is we have a source of information, and that source of information is going to be transmitted over a channel, and then it's going to be received by the receiver. And the receiver is going to do something with it. And so the way that we think about it is we have a source of information, and that source of information is going to be transmitted over a channel, and then it's going to be received by the receiver. And the receiver is going to do something with it. And so the way that we think about it is we have a source of information, and that source of information is going to be transmitted over a channel, and then it's going to be received by the receiver. And the receiver is going to do something with it. And so the way that we think about it is we have a source of information, and that source of information is going to be transmitted over a channel, and then it's going to be received by the receiver. And the receiver is going to do something with it. And so the way that we think about it is we have a source of information, and that source of information is going to be transmitted over a channel, and then it's going to be received by the receiver. And the receiver is going to do something with it. And so the way that we think about it is we have a source of information, and that source of information is going to be transmitted over a channel, and then it's going to be received by the receiver. And the receiver is going to do something with it. And so the way that we think about it is we have a source of information, and that source of information is going to be transmitted over a channel, and then it's going to be received by the receiver. And the receiver is going to do something with it. And so the way that we think about it is we have a source of information, and that source of information is going to be transmitted over a channel, and then it's going to be received by the receiver. And the receiver is going to do something with it. And so the way that we think about it is we have a source of information, and that source of information is going to be transmitted over a channel, and then it's going to be received by the receiver. And the receiver is going to do something with it. And so the way that we think about it is we have a source of information, and that source of information is going to be transmitted over a channel, and then it's going to be received by the receiver. And the receiver is going to do something with it. And so the way that we think about it is we have a source of information, and that source of information is going to be transmitted over a channel, and then it's going to be received by the receiver. And the receiver is going to do something with it. And so the way that we think about it is we have a source of information, and that source of information is going to be transmitted over a channel, and then it's going to be received by the receiver. And the receiver is going to do something with it. And so the way that we think about it is we have a source of information, and that source of information is going to be transmitted over a channel, and then it's going to be received by the receiver. And the receiver is going to do something with it. And so the way that we think about it is we have a source of information, and that source of information is going to be transmitted over a channel, and then it's going to be received [... content shortened for brevity...]
   ```

2. Question: Importance of Photosynthesis \
   Answer:
   ```code
   So I'm sitting here in my backyard, and I'm looking at all of the plants that are around me. And I'm wondering, how do they get their energy? How do they get their food? And I'm also wondering, how do they get the oxygen that I need to breathe? And so I'm gonna think about this a little bit more, and I'm gonna think about it in terms of molecules. So let's say that I am a plant, and I need to get some energy. Well, I could eat another plant, but that's not very efficient. And so what I'm gonna do is I'm gonna take carbon dioxide from the air, and I'm gonna take water from the ground, and I'm gonna use energy from the sun to convert those into sugars. And those sugars are my energy. And I'm also going to produce oxygen as a byproduct. And so this process of taking carbon dioxide from the air, water from the ground, and using energy from the sun to produce sugars, and oxygen as a byproduct, that is photosynthesis. And it's the reason why we can breathe. And it's the reason why plants can grow. And it's the reason why we can grow. Because we can eat the plants. And so I'm gonna think about this a little bit more. So let's say that I am a plant, and I need to get some energy. Well, I could eat another plant, but that's not very efficient. And so what I'm gonna do is I'm gonna take carbon dioxide from the air, and I'm gonna take water from the ground, and I'm gonna use energy from the sun to convert those into sugars. And those sugars are my energy. And I'm also going to produce oxygen as a byproduct. And so this process of taking carbon dioxide from the air, water from the ground, and using energy from the sun to produce sugars, and oxygen as a byproduct, that is photosynthesis. And it's the reason why we can breathe. And it's the reason why plants can grow. And it's the reason why we can grow, because we can eat the plants.  So let's just think about this a little bit more. So let's say that I am a plant, and I need to get some energy. Well, I could eat another plant, but that's not very efficient. And so what I'm gonna do is I'm gonna take carbon dioxide from the air, and I'm gonna take water from the ground, and I'm gonna use energy from the sun to convert those into sugars. And those sugars are my energy. And I'm also going to produce oxygen as a byproduct. And so this process of taking carbon dioxide from the air, water from the ground, and using energy from the sun to produce sugars, and oxygen as a byproduct, that is photosynthesis. And it's the reason why we can breathe. And it's the reason why plants can grow. And it's the reason why we can grow, because we can eat the plants.  So let's just think about this a little bit more. So let's say that I am a plant, and I need to get some energy. Well, I could eat another plant, but that's not very efficient. And so what I'm gonna do is I'm gonna take carbon dioxide from the air, and I'm gonna take water from the ground, and I'm gonna use energy from the sun to convert those into sugars. And those sugars are my energy. And I'm also going to produce oxygen as a byproduct. And so this process of taking carbon dioxide from the air, water from the ground, and using energy from the sun to produce sugars, and oxygen as a byproduct, that is photosynthesis. And it's the reason why we can breathe. And it's the reason why plants can grow. And it's the reason why we can grow, because we can eat the plants.  So let's just think about this a little bit more. So let's say that I am a plant, and I need to get some energy. Well, I could eat another plant, but that's not very efficient. And so what I'm gonna do is I'm gonna take carbon dioxide from the air, and I'm gonna take water from the ground, and I'm gonna use energy from the sun to convert those into sugars. And those sugars are my energy. And I'm also going to produce oxygen as a byproduct. And so this process [... content shortened for brevity ...]
   ```

## Model Details

- **Developed by:** [IBL Education](https://ibl.ai)
- **Model type:** [Mistral-7B-v0.1](https://huggingface.co/mistralai/Mistral-7B-v0.1)
- **Base Model:** [Mistral-7B-v0.1](https://huggingface.co/mistralai/Mistral-7B-v0.1)
- **Language:** English
- **Finetuned from weights:** [Mistral-7B-v0.1](https://huggingface.co/mistralai/Mistral-7B-v0.1)
- **Finetuned on data:**
  - [ibleducation/ibl-khanacademy-transcripts](https://huggingface.co/datasets/ibleducation/ibl-khanacademy-transcripts)
- **Model License:** MIT

## How to Get Started with the Model

### Install the necessary packages

Requires: [transformers](https://pypi.org/project/transformers/) > 4.35.0 
```shell
pip install transformers
pip install accelerate
```
### You can then try the following example code

```python
from transformers import AutoModelForCausalLM, AutoTokenizer
import transformers
import torch

model_id = "ibleducation/ibl-neural-edu-tutor-7B"

tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
  model_id,
  device_map="auto",
)
pipeline = transformers.pipeline(
    "text-generation",
    model=model,
    tokenizer=tokenizer,
)
prompt = "<s>[INST]Information Theory[/INST] "

response = pipeline(prompt)
print(response['generated_text'])
```

**Important** - Use the prompt template below:
```
<s>[INST]{prompt}[/INST] 
```