Update README.md
Browse files
README.md
CHANGED
@@ -1,90 +1,129 @@
|
|
1 |
---
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
- OpenAssistant/oasst_top1_2023-08-25
|
7 |
-
language:
|
8 |
-
- en
|
9 |
-
tags:
|
10 |
-
- GGUF
|
11 |
-
- llamafile
|
12 |
-
model_creator: TinyLlama
|
13 |
-
model_name: TinyLlama-1.1B-Chat v1.0
|
14 |
-
model_type: Pythia
|
15 |
-
quantized_by: jartine
|
16 |
---
|
17 |
|
18 |
-
#
|
|
|
19 |
|
20 |
-
|
21 |
-
- Original model: [TinyLlama-1.1B-Chat-v1.0](https://huggingface.co/TinyLlama/TinyLlama-1.1B-Chat-v1.0)
|
22 |
|
23 |
-
<!-- description start -->
|
24 |
-
## Description
|
25 |
|
26 |
-
|
27 |
|
28 |
-
|
29 |
|
30 |
-
|
31 |
|
32 |
-
##
|
33 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
```
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
```
|
41 |
|
42 |
-
|
43 |
|
44 |
-
|
45 |
-
</div>
|
46 |
|
47 |
-
|
|
|
|
|
|
|
48 |
|
49 |
-
|
50 |
|
|
|
|
|
|
|
|
|
51 |
|
52 |
-
We adopted exactly the same architecture and tokenizer as Llama 2. This means TinyLlama can be plugged and played in many open-source projects built upon Llama. Besides, TinyLlama is compact with only 1.1B parameters. This compactness allows it to cater to a multitude of applications demanding a restricted computation and memory footprint.
|
53 |
|
54 |
-
|
55 |
-
This is the chat model finetuned on top of [TinyLlama/TinyLlama-1.1B-intermediate-step-1431k-3T](https://huggingface.co/TinyLlama/TinyLlama-1.1B-intermediate-step-1431k-3T). **We follow [HF's Zephyr](https://huggingface.co/HuggingFaceH4/zephyr-7b-alpha/edit/main/README.md)'s training recipe.** The model was " initially fine-tuned on a variant of the [`UltraChat`](https://huggingface.co/datasets/stingning/ultrachat) dataset, which contains a diverse range of synthetic dialogues generated by ChatGPT.
|
56 |
-
We then further aligned the model with [🤗 TRL's](https://github.com/huggingface/trl) `DPOTrainer` on the [openbmb/UltraFeedback](https://huggingface.co/datasets/openbmb/UltraFeedback) dataset, which contain 64k prompts and model completions that are ranked by GPT-4."
|
57 |
|
|
|
58 |
|
59 |
-
|
60 |
-
You will need the transformers>=4.34
|
61 |
-
Do check the [TinyLlama](https://github.com/jzhang38/TinyLlama) github page for more information.
|
62 |
|
63 |
-
|
64 |
-
# Install transformers from source - only needed for versions <= v4.34
|
65 |
-
# pip install git+https://github.com/huggingface/transformers.git
|
66 |
-
# pip install accelerate
|
67 |
|
68 |
-
import torch
|
69 |
-
from transformers import pipeline
|
70 |
|
71 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
72 |
|
73 |
-
# We use the tokenizer's chat template to format each message - see https://huggingface.co/docs/transformers/main/en/chat_templating
|
74 |
-
messages = [
|
75 |
-
{
|
76 |
-
"role": "system",
|
77 |
-
"content": "You are a friendly chatbot who always responds in the style of a pirate",
|
78 |
-
},
|
79 |
-
{"role": "user", "content": "How many helicopters can a human eat in one sitting?"},
|
80 |
-
]
|
81 |
-
prompt = pipe.tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
|
82 |
-
outputs = pipe(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
|
83 |
-
print(outputs[0]["generated_text"])
|
84 |
-
# <|system|>
|
85 |
-
# You are a friendly chatbot who always responds in the style of a pirate.</s>
|
86 |
-
# <|user|>
|
87 |
-
# How many helicopters can a human eat in one sitting?</s>
|
88 |
-
# <|assistant|>
|
89 |
-
# ...
|
90 |
-
```
|
|
|
1 |
---
|
2 |
+
slug: access-astra
|
3 |
+
title: Access Astra Board
|
4 |
+
authors: [asahu]
|
5 |
+
tags: [connect,access]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
---
|
7 |
|
8 |
+
# Guide to access Astra Machina Dev Board
|
9 |
+
This tutorial will guide you through the steps required to access a Astra Machina Dev Board.
|
10 |
|
11 |
+
We can access our Astra Machina Board using:
|
|
|
12 |
|
|
|
|
|
13 |
|
14 |
+
**1. Using ADB on Host Machine**
|
15 |
|
16 |
+
**2. Using Tera Term / Putty on Host Machine**
|
17 |
|
18 |
+
**3. Using Wayland Terminal on Astra Board**
|
19 |
|
20 |
+
## 1. ADB
|
21 |
|
22 |
+
### Connect to your board
|
23 |
+
|
24 |
+
To communicate with your board via Android Debug Bridge (ADB) first connect a USB cable from your dev machine to the USB C port on the board marked "USB-2.0".
|
25 |
+
|
26 |
+
![board](https://synaptics-astra.github.io/doc/v/0.9.0/_images/usb-c.png)
|
27 |
+
|
28 |
+
:::warning
|
29 |
+
The other USB-C marked PWR_IN should be connected to the power supply - make sure you get them the right way around!
|
30 |
+
:::
|
31 |
+
|
32 |
+
|
33 |
+
If you don't have ADB,it can be installed as part of [Android SDK Platform-Tools](https://developer.android.com/tools/releases/platform-tools#downloads). You should then be able to open a MacOS, Linux or Windows shell inside folder `platform-tools` and run:
|
34 |
+
|
35 |
+
```bash
|
36 |
+
adb devices
|
37 |
```
|
38 |
+
|
39 |
+
You can check if the Synaptics Astra board is attached:
|
40 |
+
|
41 |
+
<pre>List of devices attached
|
42 |
+
SL16x0 device</pre>
|
43 |
+
|
44 |
+
See the [user guide](https://synaptics-astra.github.io/doc/v/0.9.0/linux/index.html#the-shell-with-adb) for more information on ADB.
|
45 |
+
|
46 |
+
|
47 |
+
### Copy across the sample image
|
48 |
+
|
49 |
+
First, copy the example image from your dev machine to the board:
|
50 |
+
|
51 |
+
```
|
52 |
+
adb push ~/Downloads/expanse.jpg /home/weston/expanse.jpg
|
53 |
```
|
54 |
|
55 |
+
### Start a shell session
|
56 |
|
57 |
+
Then start a shell session:
|
|
|
58 |
|
59 |
+
```
|
60 |
+
adb shell
|
61 |
+
hostname
|
62 |
+
```
|
63 |
|
64 |
+
You should see the prompt has changed and the board responds with a hostname:
|
65 |
|
66 |
+
<pre>
|
67 |
+
sh-5.1# hostname
|
68 |
+
sl1680
|
69 |
+
</pre>
|
70 |
|
|
|
71 |
|
72 |
+
## 2. Tera Term / Putty
|
|
|
|
|
73 |
|
74 |
+
### Connect to your board
|
75 |
|
76 |
+
To communicate with your board via Tera Term or Putty first connect a **UART** from your dev machine to the GPIO Header of the board following this image:
|
|
|
|
|
77 |
|
78 |
+
**VDD -> Pin 1 , GND -> Pin 6 , TX -> Pin 8 and RX -> Pin 10**.
|
|
|
|
|
|
|
79 |
|
|
|
|
|
80 |
|
81 |
+
![image](https://synaptics-astra.github.io/doc/v/1.0.0/_images/40-pin-connector.png )
|
82 |
+
|
83 |
+
|
84 |
+
### Tera Term settings
|
85 |
+
|
86 |
+
Open Tera Term: New connection then Select Serial -> Port: 'COM$: Silicon Labs CP210x USB to UART Bridge'
|
87 |
+
|
88 |
+
Go to 'Setup' and Open 'Serial Port'
|
89 |
+
Then set 'Speed' -> '115200' and Click 'New Open'
|
90 |
+
|
91 |
+
|
92 |
+
### Copy across the sample image
|
93 |
+
|
94 |
+
Once in Tera Term is setup, Get the Inet address of your Astra Machina Board from here.
|
95 |
+
<!-- ```bash title="ADB_Terminal" class="no-copy-prompt"
|
96 |
+
sh-5.1# ifconfig eth0 | grep "inet addr" -->
|
97 |
+
```bash
|
98 |
+
ifconfig eth0 | grep "inet addr"
|
99 |
+
```
|
100 |
+
Copy the example image from your dev machine to the board using `scp ` to Machina board:
|
101 |
+
|
102 |
+
```bash
|
103 |
+
scp ~/Downloads/expanse.jpg [email protected]:/home/root
|
104 |
+
```
|
105 |
+
|
106 |
+
|
107 |
+
## 3. Wayland Terminal
|
108 |
+
### Connect to your board
|
109 |
+
|
110 |
+
Connect the Power supply in USB-C marked **PWR_IN**.
|
111 |
+
|
112 |
+
Astra Machina’s graphical desktop is enabled be default. It can be displayed on an external display connected to the HDMI port or a MIPI display.
|
113 |
+
|
114 |
+
|
115 |
+
Input can be provided by connecting a standard USB keyboard and mouse.
|
116 |
+
|
117 |
+
![image](https://synaptics-astra.github.io/doc/v/0.9.0/_images/board-ports.png)
|
118 |
+
|
119 |
+
:::warning
|
120 |
+
HDMI is currently not supported on SL1620
|
121 |
+
:::
|
122 |
+
|
123 |
+
### Wayland Desktop
|
124 |
+
|
125 |
+
Clicking on the icon in the top left corner will open a terminal.
|
126 |
+
|
127 |
+
![image](https://synaptics-astra.github.io/doc/v/0.9.0/_images/wayland-terminal.jpg)
|
128 |
+
|
129 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|