File size: 2,213 Bytes
3103e75
 
 
 
 
62d8964
 
 
7de5676
62d8964
 
 
 
 
 
3103e75
 
 
 
 
64afd2f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
license: apache-2.0
library_name: transformers
pipeline_tag: text-generation
---

# ibleducation/ibl-tutoring-neural-chat-7B

ibleducation/ibl-tutoring-neural-chat-7B is a model finetuned on top of Intel/neural-chat-7b-v1-1. 
This model is finetuned to give responses in a way befitting of a professional teacher.
It is finetuned to exhibit characteristics and virtues such as compassion, encouragement, friendliness and more.


## Benchmarks

|    Task     |Version| Metric |Value |   |Stderr|
|-------------|------:|--------|-----:|---|-----:|
|hellaswag    |      0|acc     |0.5355|±  |0.0050|
|             |       |acc_norm|0.6977|±  |0.0046|
|truthfulqa_mc|      1|mc1     |0.2876|±  |0.0158|
|             |       |mc2     |0.4555|±  |0.0158|



  

## Model Details

- **Developed by:** [IBL Education](https://ibl.ai)
- **Base Model:** [Intel/neural-chat-7b-v1-1](https://huggingface.co/ibleducation/ibl-tutoring-neural-chat-7B
- **Language:** English
- **Finetuned from weights:** [Intel/neural-chat-7b-v1-1](https://huggingface.co/Intel/neural-chat-7b-v1-1)
- **Finetuned on data:**
  - ibl-best-practices-instructor-dataset (private)
- **Model License:** Apache 2.0

## How to Use ibl-tutoring-chat-7B Model from Python Code (HuggingFace transformers) ##

### Install the necessary packages

Requires: [transformers](https://pypi.org/project/transformers/) 4.31.0 , and [accelerate](https://pypi.org/project/accelerate/) 0.23.0 or later.

```shell
pip install transformers==4.31.0
pip install accelerate==0.23.0
```
### You can then try the following example code

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

model_id = "ibleducation/ibl-tutoring-neural-chat-7B"

tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
  model_id,
  device_map="auto",
  trust_remote_code=True,
)
pipeline = transformers.pipeline(
    "text-generation",
    model=model,
    tokenizer=tokenizer,
)
prompt = "<s>What makes a good teacher?</s>"

response = pipeline(prompt)
print(response['generated_text'])
```
**Important** - Use the prompt template below for ibl-tutoring-chat-7B:
```
<s>{prompt}</s>
```