File size: 1,813 Bytes
5917da2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
beace09
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
license: apache-2.0
datasets:
- EleutherAI/pile
- openwebtext
language:
- en
- fa
- de
- fr
- nl
- ar
pipeline_tag: text-generation
tags:
- code
- easydel
- OST
---
# Mpt-7B-Assistant

[![License: Apache v2](https://img.shields.io/badge/License-Apache%20v2-blue.svg)](https://opensource.org/licenses/Apache-2.0)

Mpt-7B-Assistant is an AI assistant built using Flax/JAX and trained on Cloud TPUs. The model has a context length of 5144 and 7B parameters, making it suitable for a wide range of natural language processing tasks.

## Usage

Once you have installed the repository, you can start using the model by importing it into your Python code:

```python
from transformers import AutoTokenizer, FlaxAutoModelForCausalLM

tokenizer = AutoTokenizer.from_pretrained("huggingface/Mpt-7B-Assistant")
model = FlaxAutoModelForCausalLM.from_pretrained("huggingface/Mpt-7B-Assistant")

prompt = "<|endoftext|><|prompter|>Hello, how are you today?<|endoftext|><|assistant|>"
input_ids = tokenizer.encode(prompt, return_tensors="jax")

output_ids = model.generate(input_ids, max_length=100)
output_text = tokenizer.decode(output_ids[0], skip_special_tokens=True)

print(output_text)
```

This will generate a response from the model based on the input prompt. You can customize the length of the generated output by changing the `max_length` parameter in the `generate()` method.

## Training

The Mpt-7B-Assistant model was trained using EasyDel and OST-OpenSourceTransformers library, which provides an easy-to-use interface for training large language models on Cloud TPUs.

This will train the model on the specified dataset using Cloud TPUs, and save the trained model to the specified output directory.

## License

Mpt-7B-Assistant is licensed under the Apache v2 License. See `LICENSE` for more information.