Omkar Thawakar commited on
Commit
1876606
1 Parent(s): f8af957

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +35 -1
README.md CHANGED
@@ -8,11 +8,27 @@ tags:
8
  - nlp
9
  - code
10
  ---
 
 
 
11
 
12
  ## Model Summary
13
 
14
  MobiLlama-05B is a Small Language Model with **0.5 billion** parameters. It was trained using the Amber data sources [Amber-Dataset](https://huggingface.co/datasets/LLM360/AmberDatasets).
15
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  ## How to Use
17
 
18
  MobiLlama-05B has been integrated in the development version (4.37.0.dev) of `transformers`. Until the official version is released through `pip`, ensure that you are doing one of the following:
@@ -23,7 +39,25 @@ MobiLlama-05B has been integrated in the development version (4.37.0.dev) of `tr
23
 
24
  The current `transformers` version can be verified with: `pip list | grep transformers`.
25
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26
  ## Intended Uses
27
 
28
- Given the nature of the training data, the Phi-2 model is best suited for prompts using the QA format, the chat format, and the code format.
29
 
 
8
  - nlp
9
  - code
10
  ---
11
+ # MobiLlama-05B
12
+
13
+ <center><img src="MobileLLaMa.png" alt="mobillama logo" width="300"/></center>
14
 
15
  ## Model Summary
16
 
17
  MobiLlama-05B is a Small Language Model with **0.5 billion** parameters. It was trained using the Amber data sources [Amber-Dataset](https://huggingface.co/datasets/LLM360/AmberDatasets).
18
 
19
+
20
+ ## Model Description
21
+
22
+ - **Model type:** Small Language Model (SLM) built using the architecture design of LLaMA-7B
23
+ - **Language(s) (NLP):** English
24
+ - **License:** Apache 2.0
25
+ - **Resources for more information:**
26
+ - [Training Code](https://github.com/LLM360/amber-train)
27
+ - [Data Preparation](https://github.com/LLM360/amber-data-prep)
28
+ - [Metrics](https://github.com/LLM360/Analysis360)
29
+ - [Fully processed Amber pretraining data](https://huggingface.co/datasets/LLM360/AmberDatasets)
30
+
31
+
32
  ## How to Use
33
 
34
  MobiLlama-05B has been integrated in the development version (4.37.0.dev) of `transformers`. Until the official version is released through `pip`, ensure that you are doing one of the following:
 
39
 
40
  The current `transformers` version can be verified with: `pip list | grep transformers`.
41
 
42
+ To load a specific checkpoint, simply pass a revision with a value between `"ckpt_000"` and `"ckpt_358"`. If no revision is provided, it will load `"ckpt_359"`, which is the final checkpoint.
43
+
44
+ ```python
45
+ import torch
46
+ from transformers import AutoModelForCausalLM, AutoTokenizer
47
+
48
+ torch.set_default_device("cuda")
49
+
50
+ model = AutoModelForCausalLM.from_pretrained("MBZUAI/MobiLlama-05B", torch_dtype="auto", trust_remote_code=True)
51
+ tokenizer = AutoTokenizer.from_pretrained("MBZUAI/MobiLlama-05B", trust_remote_code=True)
52
+
53
+ text = "Write a C language program to find fibonnaci series?"
54
+ input_ids = tokenizer(text, return_tensors="pt").to('cuda').input_ids
55
+ outputs = model.generate(input_ids, max_length=1000, repetition_penalty=1.2, pad_token_id=tokenizer.eos_token_id)
56
+ print(tokenizer.batch_decode(outputs[:, input_ids.shape[1]:-1])[0].strip())
57
+
58
+ ```
59
+
60
  ## Intended Uses
61
 
62
+ Given the nature of the training data, the MobiLlama-05B model is best suited for prompts using the QA format, the chat format, and the code format.
63