erfanzar commited on
Commit
beace09
1 Parent(s): 38d4de1

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +38 -0
README.md ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Sure! Here's the updated README markdown with the Apache v2 license:
2
+
3
+ # Mpt-7B-Assistant
4
+
5
+ [![License: Apache v2](https://img.shields.io/badge/License-Apache%20v2-blue.svg)](https://opensource.org/licenses/Apache-2.0)
6
+
7
+ 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.
8
+
9
+ ## Usage
10
+
11
+ Once you have installed the repository, you can start using the model by importing it into your Python code:
12
+
13
+ ```python
14
+ from transformers import AutoTokenizer, FlaxAutoModelForCausalLM
15
+
16
+ tokenizer = AutoTokenizer.from_pretrained("huggingface/Mpt-7B-Assistant")
17
+ model = FlaxAutoModelForCausalLM.from_pretrained("huggingface/Mpt-7B-Assistant")
18
+
19
+ prompt = "<|endoftext|><|prompter|>Hello, how are you today?<|endoftext|><|assistant|>"
20
+ input_ids = tokenizer.encode(prompt, return_tensors="jax")
21
+
22
+ output_ids = model.generate(input_ids, max_length=100)
23
+ output_text = tokenizer.decode(output_ids[0], skip_special_tokens=True)
24
+
25
+ print(output_text)
26
+ ```
27
+
28
+ 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.
29
+
30
+ ## Training
31
+
32
+ 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.
33
+
34
+ This will train the model on the specified dataset using Cloud TPUs, and save the trained model to the specified output directory.
35
+
36
+ ## License
37
+
38
+ Mpt-7B-Assistant is licensed under the Apache v2 License. See `LICENSE` for more information.