lxe commited on
Commit
3589e55
1 Parent(s): c90d519

Added ipynb and another example

Browse files
Files changed (2) hide show
  1. Simple_LLaMA_FineTuner.ipynb +234 -0
  2. maya-example.txt +51 -0
Simple_LLaMA_FineTuner.ipynb ADDED
@@ -0,0 +1,234 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "nbformat": 4,
3
+ "nbformat_minor": 0,
4
+ "metadata": {
5
+ "colab": {
6
+ "provenance": []
7
+ },
8
+ "kernelspec": {
9
+ "name": "python3",
10
+ "display_name": "Python 3"
11
+ },
12
+ "language_info": {
13
+ "name": "python"
14
+ },
15
+ "accelerator": "GPU",
16
+ "gpuClass": "standard"
17
+ },
18
+ "cells": [
19
+ {
20
+ "cell_type": "code",
21
+ "execution_count": 1,
22
+ "metadata": {
23
+ "colab": {
24
+ "base_uri": "https://localhost:8080/"
25
+ },
26
+ "id": "qe77im_2YudR",
27
+ "outputId": "9a8f474b-4c29-463e-c36a-25e1e028c4b8"
28
+ },
29
+ "outputs": [
30
+ {
31
+ "output_type": "stream",
32
+ "name": "stdout",
33
+ "text": [
34
+ "Wed Mar 22 03:47:25 2023 \n",
35
+ "+-----------------------------------------------------------------------------+\n",
36
+ "| NVIDIA-SMI 525.85.12 Driver Version: 525.85.12 CUDA Version: 12.0 |\n",
37
+ "|-------------------------------+----------------------+----------------------+\n",
38
+ "| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |\n",
39
+ "| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |\n",
40
+ "| | | MIG M. |\n",
41
+ "|===============================+======================+======================|\n",
42
+ "| 0 Tesla T4 Off | 00000000:00:04.0 Off | 0 |\n",
43
+ "| N/A 43C P0 26W / 70W | 0MiB / 15360MiB | 0% Default |\n",
44
+ "| | | N/A |\n",
45
+ "+-------------------------------+----------------------+----------------------+\n",
46
+ " \n",
47
+ "+-----------------------------------------------------------------------------+\n",
48
+ "| Processes: |\n",
49
+ "| GPU GI CI PID Type Process name GPU Memory |\n",
50
+ "| ID ID Usage |\n",
51
+ "|=============================================================================|\n",
52
+ "| No running processes found |\n",
53
+ "+-----------------------------------------------------------------------------+\n"
54
+ ]
55
+ }
56
+ ],
57
+ "source": [
58
+ "!nvidia-smi"
59
+ ]
60
+ },
61
+ {
62
+ "cell_type": "code",
63
+ "source": [
64
+ "![[ -d /content/simple-llama-finetuner ]] \\\n",
65
+ " || git clone https://github.com/lxe/simple-llama-finetuner.git /content/simple-llama-finetuner\n",
66
+ "!cd /content/simple-llama-finetuner && git pull && pip install -r requirements.txt"
67
+ ],
68
+ "metadata": {
69
+ "colab": {
70
+ "base_uri": "https://localhost:8080/"
71
+ },
72
+ "id": "3PM_DilAZD8T",
73
+ "outputId": "83c6ff7e-518f-4ceb-ac9d-df22660f5ce5"
74
+ },
75
+ "execution_count": 2,
76
+ "outputs": [
77
+ {
78
+ "output_type": "stream",
79
+ "name": "stdout",
80
+ "text": [
81
+ "Already up to date.\n",
82
+ "Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/\n",
83
+ "Collecting git+https://github.com/huggingface/transformers.git (from -r requirements.txt (line 4))\n",
84
+ " Cloning https://github.com/huggingface/transformers.git to /tmp/pip-req-build-uhmp_y8i\n",
85
+ " Running command git clone --filter=blob:none --quiet https://github.com/huggingface/transformers.git /tmp/pip-req-build-uhmp_y8i\n",
86
+ " Resolved https://github.com/huggingface/transformers.git to commit 0dcb46e7a4a9e587ba84ff35778ab4233a184c11\n",
87
+ " Installing build dependencies ... \u001b[?25l\u001b[?25hdone\n",
88
+ " Getting requirements to build wheel ... \u001b[?25l\u001b[?25hdone\n",
89
+ " Preparing metadata (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n",
90
+ "Collecting git+https://github.com/huggingface/peft.git (from -r requirements.txt (line 7))\n",
91
+ " Cloning https://github.com/huggingface/peft.git to /tmp/pip-req-build-ieyxkty1\n",
92
+ " Running command git clone --filter=blob:none --quiet https://github.com/huggingface/peft.git /tmp/pip-req-build-ieyxkty1\n",
93
+ " Resolved https://github.com/huggingface/peft.git to commit 13e53fc7ee5d89d59b16523051006dddf0fb7a49\n",
94
+ " Installing build dependencies ... \u001b[?25l\u001b[?25hdone\n",
95
+ " Getting requirements to build wheel ... \u001b[?25l\u001b[?25hdone\n",
96
+ " Preparing metadata (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n",
97
+ "Requirement already satisfied: datasets in /usr/local/lib/python3.9/dist-packages (from -r requirements.txt (line 1)) (2.10.1)\n",
98
+ "Requirement already satisfied: loralib in /usr/local/lib/python3.9/dist-packages (from -r requirements.txt (line 2)) (0.1.1)\n",
99
+ "Requirement already satisfied: sentencepiece in /usr/local/lib/python3.9/dist-packages (from -r requirements.txt (line 3)) (0.1.97)\n",
100
+ "Requirement already satisfied: accelerate in /usr/local/lib/python3.9/dist-packages (from -r requirements.txt (line 5)) (0.17.1)\n",
101
+ "Requirement already satisfied: bitsandbytes in /usr/local/lib/python3.9/dist-packages (from -r requirements.txt (line 6)) (0.37.2)\n",
102
+ "Requirement already satisfied: gradio in /usr/local/lib/python3.9/dist-packages (from -r requirements.txt (line 8)) (3.23.0)\n",
103
+ "Requirement already satisfied: tqdm>=4.62.1 in /usr/local/lib/python3.9/dist-packages (from datasets->-r requirements.txt (line 1)) (4.65.0)\n",
104
+ "Requirement already satisfied: xxhash in /usr/local/lib/python3.9/dist-packages (from datasets->-r requirements.txt (line 1)) (3.2.0)\n",
105
+ "Requirement already satisfied: aiohttp in /usr/local/lib/python3.9/dist-packages (from datasets->-r requirements.txt (line 1)) (3.8.4)\n",
106
+ "Requirement already satisfied: packaging in /usr/local/lib/python3.9/dist-packages (from datasets->-r requirements.txt (line 1)) (23.0)\n",
107
+ "Requirement already satisfied: numpy>=1.17 in /usr/local/lib/python3.9/dist-packages (from datasets->-r requirements.txt (line 1)) (1.22.4)\n",
108
+ "Requirement already satisfied: requests>=2.19.0 in /usr/local/lib/python3.9/dist-packages (from datasets->-r requirements.txt (line 1)) (2.27.1)\n",
109
+ "Requirement already satisfied: fsspec[http]>=2021.11.1 in /usr/local/lib/python3.9/dist-packages (from datasets->-r requirements.txt (line 1)) (2023.3.0)\n",
110
+ "Requirement already satisfied: pandas in /usr/local/lib/python3.9/dist-packages (from datasets->-r requirements.txt (line 1)) (1.4.4)\n",
111
+ "Requirement already satisfied: huggingface-hub<1.0.0,>=0.2.0 in /usr/local/lib/python3.9/dist-packages (from datasets->-r requirements.txt (line 1)) (0.13.3)\n",
112
+ "Requirement already satisfied: pyyaml>=5.1 in /usr/local/lib/python3.9/dist-packages (from datasets->-r requirements.txt (line 1)) (6.0)\n",
113
+ "Requirement already satisfied: multiprocess in /usr/local/lib/python3.9/dist-packages (from datasets->-r requirements.txt (line 1)) (0.70.14)\n",
114
+ "Requirement already satisfied: pyarrow>=6.0.0 in /usr/local/lib/python3.9/dist-packages (from datasets->-r requirements.txt (line 1)) (9.0.0)\n",
115
+ "Requirement already satisfied: responses<0.19 in /usr/local/lib/python3.9/dist-packages (from datasets->-r requirements.txt (line 1)) (0.18.0)\n",
116
+ "Requirement already satisfied: dill<0.3.7,>=0.3.0 in /usr/local/lib/python3.9/dist-packages (from datasets->-r requirements.txt (line 1)) (0.3.6)\n",
117
+ "Requirement already satisfied: regex!=2019.12.17 in /usr/local/lib/python3.9/dist-packages (from transformers==4.28.0.dev0->-r requirements.txt (line 4)) (2022.10.31)\n",
118
+ "Requirement already satisfied: tokenizers!=0.11.3,<0.14,>=0.11.1 in /usr/local/lib/python3.9/dist-packages (from transformers==4.28.0.dev0->-r requirements.txt (line 4)) (0.13.2)\n",
119
+ "Requirement already satisfied: filelock in /usr/local/lib/python3.9/dist-packages (from transformers==4.28.0.dev0->-r requirements.txt (line 4)) (3.10.0)\n",
120
+ "Requirement already satisfied: psutil in /usr/local/lib/python3.9/dist-packages (from accelerate->-r requirements.txt (line 5)) (5.9.4)\n",
121
+ "Requirement already satisfied: torch>=1.4.0 in /usr/local/lib/python3.9/dist-packages (from accelerate->-r requirements.txt (line 5)) (1.13.1+cu116)\n",
122
+ "Requirement already satisfied: orjson in /usr/local/lib/python3.9/dist-packages (from gradio->-r requirements.txt (line 8)) (3.8.8)\n",
123
+ "Requirement already satisfied: markupsafe in /usr/local/lib/python3.9/dist-packages (from gradio->-r requirements.txt (line 8)) (2.1.2)\n",
124
+ "Requirement already satisfied: fastapi in /usr/local/lib/python3.9/dist-packages (from gradio->-r requirements.txt (line 8)) (0.95.0)\n",
125
+ "Requirement already satisfied: jinja2 in /usr/local/lib/python3.9/dist-packages (from gradio->-r requirements.txt (line 8)) (3.1.2)\n",
126
+ "Requirement already satisfied: pydub in /usr/local/lib/python3.9/dist-packages (from gradio->-r requirements.txt (line 8)) (0.25.1)\n",
127
+ "Requirement already satisfied: mdit-py-plugins<=0.3.3 in /usr/local/lib/python3.9/dist-packages (from gradio->-r requirements.txt (line 8)) (0.3.3)\n",
128
+ "Requirement already satisfied: uvicorn in /usr/local/lib/python3.9/dist-packages (from gradio->-r requirements.txt (line 8)) (0.21.1)\n",
129
+ "Requirement already satisfied: pillow in /usr/local/lib/python3.9/dist-packages (from gradio->-r requirements.txt (line 8)) (8.4.0)\n",
130
+ "Requirement already satisfied: semantic-version in /usr/local/lib/python3.9/dist-packages (from gradio->-r requirements.txt (line 8)) (2.10.0)\n",
131
+ "Requirement already satisfied: markdown-it-py[linkify]>=2.0.0 in /usr/local/lib/python3.9/dist-packages (from gradio->-r requirements.txt (line 8)) (2.2.0)\n",
132
+ "Requirement already satisfied: matplotlib in /usr/local/lib/python3.9/dist-packages (from gradio->-r requirements.txt (line 8)) (3.7.1)\n",
133
+ "Requirement already satisfied: websockets>=10.0 in /usr/local/lib/python3.9/dist-packages (from gradio->-r requirements.txt (line 8)) (10.4)\n",
134
+ "Requirement already satisfied: typing-extensions in /usr/local/lib/python3.9/dist-packages (from gradio->-r requirements.txt (line 8)) (4.5.0)\n",
135
+ "Requirement already satisfied: pydantic in /usr/local/lib/python3.9/dist-packages (from gradio->-r requirements.txt (line 8)) (1.10.6)\n",
136
+ "Requirement already satisfied: aiofiles in /usr/local/lib/python3.9/dist-packages (from gradio->-r requirements.txt (line 8)) (23.1.0)\n",
137
+ "Requirement already satisfied: ffmpy in /usr/local/lib/python3.9/dist-packages (from gradio->-r requirements.txt (line 8)) (0.3.0)\n",
138
+ "Requirement already satisfied: altair>=4.2.0 in /usr/local/lib/python3.9/dist-packages (from gradio->-r requirements.txt (line 8)) (4.2.2)\n",
139
+ "Requirement already satisfied: httpx in /usr/local/lib/python3.9/dist-packages (from gradio->-r requirements.txt (line 8)) (0.23.3)\n",
140
+ "Requirement already satisfied: python-multipart in /usr/local/lib/python3.9/dist-packages (from gradio->-r requirements.txt (line 8)) (0.0.6)\n",
141
+ "Requirement already satisfied: jsonschema>=3.0 in /usr/local/lib/python3.9/dist-packages (from altair>=4.2.0->gradio->-r requirements.txt (line 8)) (4.3.3)\n",
142
+ "Requirement already satisfied: entrypoints in /usr/local/lib/python3.9/dist-packages (from altair>=4.2.0->gradio->-r requirements.txt (line 8)) (0.4)\n",
143
+ "Requirement already satisfied: toolz in /usr/local/lib/python3.9/dist-packages (from altair>=4.2.0->gradio->-r requirements.txt (line 8)) (0.12.0)\n",
144
+ "Requirement already satisfied: multidict<7.0,>=4.5 in /usr/local/lib/python3.9/dist-packages (from aiohttp->datasets->-r requirements.txt (line 1)) (6.0.4)\n",
145
+ "Requirement already satisfied: yarl<2.0,>=1.0 in /usr/local/lib/python3.9/dist-packages (from aiohttp->datasets->-r requirements.txt (line 1)) (1.8.2)\n",
146
+ "Requirement already satisfied: charset-normalizer<4.0,>=2.0 in /usr/local/lib/python3.9/dist-packages (from aiohttp->datasets->-r requirements.txt (line 1)) (2.0.12)\n",
147
+ "Requirement already satisfied: frozenlist>=1.1.1 in /usr/local/lib/python3.9/dist-packages (from aiohttp->datasets->-r requirements.txt (line 1)) (1.3.3)\n",
148
+ "Requirement already satisfied: attrs>=17.3.0 in /usr/local/lib/python3.9/dist-packages (from aiohttp->datasets->-r requirements.txt (line 1)) (22.2.0)\n",
149
+ "Requirement already satisfied: aiosignal>=1.1.2 in /usr/local/lib/python3.9/dist-packages (from aiohttp->datasets->-r requirements.txt (line 1)) (1.3.1)\n",
150
+ "Requirement already satisfied: async-timeout<5.0,>=4.0.0a3 in /usr/local/lib/python3.9/dist-packages (from aiohttp->datasets->-r requirements.txt (line 1)) (4.0.2)\n",
151
+ "Requirement already satisfied: mdurl~=0.1 in /usr/local/lib/python3.9/dist-packages (from markdown-it-py[linkify]>=2.0.0->gradio->-r requirements.txt (line 8)) (0.1.2)\n",
152
+ "Requirement already satisfied: linkify-it-py<3,>=1 in /usr/local/lib/python3.9/dist-packages (from markdown-it-py[linkify]>=2.0.0->gradio->-r requirements.txt (line 8)) (2.0.0)\n",
153
+ "Requirement already satisfied: pytz>=2020.1 in /usr/local/lib/python3.9/dist-packages (from pandas->datasets->-r requirements.txt (line 1)) (2022.7.1)\n",
154
+ "Requirement already satisfied: python-dateutil>=2.8.1 in /usr/local/lib/python3.9/dist-packages (from pandas->datasets->-r requirements.txt (line 1)) (2.8.2)\n",
155
+ "Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.9/dist-packages (from requests>=2.19.0->datasets->-r requirements.txt (line 1)) (3.4)\n",
156
+ "Requirement already satisfied: urllib3<1.27,>=1.21.1 in /usr/local/lib/python3.9/dist-packages (from requests>=2.19.0->datasets->-r requirements.txt (line 1)) (1.26.15)\n",
157
+ "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.9/dist-packages (from requests>=2.19.0->datasets->-r requirements.txt (line 1)) (2022.12.7)\n",
158
+ "Requirement already satisfied: starlette<0.27.0,>=0.26.1 in /usr/local/lib/python3.9/dist-packages (from fastapi->gradio->-r requirements.txt (line 8)) (0.26.1)\n",
159
+ "Requirement already satisfied: rfc3986[idna2008]<2,>=1.3 in /usr/local/lib/python3.9/dist-packages (from httpx->gradio->-r requirements.txt (line 8)) (1.5.0)\n",
160
+ "Requirement already satisfied: sniffio in /usr/local/lib/python3.9/dist-packages (from httpx->gradio->-r requirements.txt (line 8)) (1.3.0)\n",
161
+ "Requirement already satisfied: httpcore<0.17.0,>=0.15.0 in /usr/local/lib/python3.9/dist-packages (from httpx->gradio->-r requirements.txt (line 8)) (0.16.3)\n",
162
+ "Requirement already satisfied: pyparsing>=2.3.1 in /usr/local/lib/python3.9/dist-packages (from matplotlib->gradio->-r requirements.txt (line 8)) (3.0.9)\n",
163
+ "Requirement already satisfied: cycler>=0.10 in /usr/local/lib/python3.9/dist-packages (from matplotlib->gradio->-r requirements.txt (line 8)) (0.11.0)\n",
164
+ "Requirement already satisfied: contourpy>=1.0.1 in /usr/local/lib/python3.9/dist-packages (from matplotlib->gradio->-r requirements.txt (line 8)) (1.0.7)\n",
165
+ "Requirement already satisfied: importlib-resources>=3.2.0 in /usr/local/lib/python3.9/dist-packages (from matplotlib->gradio->-r requirements.txt (line 8)) (5.12.0)\n",
166
+ "Requirement already satisfied: kiwisolver>=1.0.1 in /usr/local/lib/python3.9/dist-packages (from matplotlib->gradio->-r requirements.txt (line 8)) (1.4.4)\n",
167
+ "Requirement already satisfied: fonttools>=4.22.0 in /usr/local/lib/python3.9/dist-packages (from matplotlib->gradio->-r requirements.txt (line 8)) (4.39.2)\n",
168
+ "Requirement already satisfied: h11>=0.8 in /usr/local/lib/python3.9/dist-packages (from uvicorn->gradio->-r requirements.txt (line 8)) (0.14.0)\n",
169
+ "Requirement already satisfied: click>=7.0 in /usr/local/lib/python3.9/dist-packages (from uvicorn->gradio->-r requirements.txt (line 8)) (8.1.3)\n",
170
+ "Requirement already satisfied: anyio<5.0,>=3.0 in /usr/local/lib/python3.9/dist-packages (from httpcore<0.17.0,>=0.15.0->httpx->gradio->-r requirements.txt (line 8)) (3.6.2)\n",
171
+ "Requirement already satisfied: zipp>=3.1.0 in /usr/local/lib/python3.9/dist-packages (from importlib-resources>=3.2.0->matplotlib->gradio->-r requirements.txt (line 8)) (3.15.0)\n",
172
+ "Requirement already satisfied: pyrsistent!=0.17.0,!=0.17.1,!=0.17.2,>=0.14.0 in /usr/local/lib/python3.9/dist-packages (from jsonschema>=3.0->altair>=4.2.0->gradio->-r requirements.txt (line 8)) (0.19.3)\n",
173
+ "Requirement already satisfied: uc-micro-py in /usr/local/lib/python3.9/dist-packages (from linkify-it-py<3,>=1->markdown-it-py[linkify]>=2.0.0->gradio->-r requirements.txt (line 8)) (1.0.1)\n",
174
+ "Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.9/dist-packages (from python-dateutil>=2.8.1->pandas->datasets->-r requirements.txt (line 1)) (1.16.0)\n"
175
+ ]
176
+ }
177
+ ]
178
+ },
179
+ {
180
+ "cell_type": "code",
181
+ "source": [
182
+ "!cd /content/simple-llama-finetuner && python main.py --share"
183
+ ],
184
+ "metadata": {
185
+ "colab": {
186
+ "base_uri": "https://localhost:8080/"
187
+ },
188
+ "id": "BD693wIzZKUK",
189
+ "outputId": "a392bff4-9a5b-4c8f-ecd1-6751517cd254"
190
+ },
191
+ "execution_count": null,
192
+ "outputs": [
193
+ {
194
+ "output_type": "stream",
195
+ "name": "stdout",
196
+ "text": [
197
+ "\n",
198
+ "===================================BUG REPORT===================================\n",
199
+ "Welcome to bitsandbytes. For bug reports, please submit your error trace to: https://github.com/TimDettmers/bitsandbytes/issues\n",
200
+ "================================================================================\n",
201
+ "/usr/local/lib/python3.9/dist-packages/bitsandbytes/cuda_setup/main.py:136: UserWarning: /usr/lib64-nvidia did not contain libcudart.so as expected! Searching further paths...\n",
202
+ " warn(msg)\n",
203
+ "/usr/local/lib/python3.9/dist-packages/bitsandbytes/cuda_setup/main.py:136: UserWarning: WARNING: The following directories listed in your path were found to be non-existent: {PosixPath('/sys/fs/cgroup/memory.events /var/colab/cgroup/jupyter-children/memory.events')}\n",
204
+ " warn(msg)\n",
205
+ "/usr/local/lib/python3.9/dist-packages/bitsandbytes/cuda_setup/main.py:136: UserWarning: WARNING: The following directories listed in your path were found to be non-existent: {PosixPath('--listen_host=172.28.0.12 --target_host=172.28.0.12 --tunnel_background_save_url=https'), PosixPath('//colab.research.google.com/tun/m/cc48301118ce562b961b3c22d803539adc1e0c19/gpu-t4-s-ntdfs4nb9znz --tunnel_background_save_delay=10s --tunnel_periodic_background_save_frequency=30m0s --enable_output_coalescing=true --output_coalescing_required=true')}\n",
206
+ " warn(msg)\n",
207
+ "/usr/local/lib/python3.9/dist-packages/bitsandbytes/cuda_setup/main.py:136: UserWarning: WARNING: The following directories listed in your path were found to be non-existent: {PosixPath('/env/python')}\n",
208
+ " warn(msg)\n",
209
+ "/usr/local/lib/python3.9/dist-packages/bitsandbytes/cuda_setup/main.py:136: UserWarning: WARNING: The following directories listed in your path were found to be non-existent: {PosixPath('//ipykernel.pylab.backend_inline'), PosixPath('module')}\n",
210
+ " warn(msg)\n",
211
+ "CUDA_SETUP: WARNING! libcudart.so not found in any environmental path. Searching /usr/local/cuda/lib64...\n",
212
+ "CUDA SETUP: CUDA runtime path found: /usr/local/cuda/lib64/libcudart.so\n",
213
+ "CUDA SETUP: Highest compute capability among GPUs detected: 7.5\n",
214
+ "CUDA SETUP: Detected CUDA version 118\n",
215
+ "CUDA SETUP: Loading binary /usr/local/lib/python3.9/dist-packages/bitsandbytes/libbitsandbytes_cuda118.so...\n",
216
+ "Running on local URL: http://127.0.0.1:7860\n",
217
+ "Running on public URL: https://359c9c250f70a2b979.gradio.live\n",
218
+ "\n",
219
+ "This share link expires in 72 hours. For free permanent hosting and GPU upgrades (NEW!), check out Spaces: https://huggingface.co/spaces\n"
220
+ ]
221
+ }
222
+ ]
223
+ },
224
+ {
225
+ "cell_type": "code",
226
+ "source": [],
227
+ "metadata": {
228
+ "id": "yhKSDrkKbYkG"
229
+ },
230
+ "execution_count": null,
231
+ "outputs": []
232
+ }
233
+ ]
234
+ }
maya-example.txt ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ The Maya civilization (/ˈmaɪə/) of the Mesoamerican people is known by its ancient temples and glyphs. Its Maya script is the most sophisticated and highly developed writing system in the pre-Columbian Americas. It is also noted for its art, architecture, mathematics, calendar, and astronomical system.
2
+
3
+
4
+ The Maya civilization developed in the Maya Region, an area that today comprises southeastern Mexico, all of Guatemala and Belize, and the western portions of Honduras and El Salvador.
5
+
6
+
7
+ It includes the northern lowlands of the Yucatán Peninsula and the highlands of the Sierra Madre, the Mexican state of Chiapas, southern Guatemala, El Salvador, and the southern lowlands of the Pacific littoral plain.
8
+
9
+
10
+ Today, their descendants, known collectively as the Maya, number well over 6 million individuals, speak more than twenty-eight surviving Mayan languages, and reside in nearly the same area as their ancestors.
11
+
12
+
13
+ The Archaic period, before 2000 BC, saw the first developments in agriculture and the earliest villages.
14
+
15
+
16
+ The Preclassic period (c. 2000 BC to 250 AD) saw the establishment of the first complex societies in the Maya region, and the cultivation of the staple crops of the Maya diet, including maize, beans, squashes, and chili peppers.
17
+
18
+
19
+ The first Maya cities developed around 750 BC, and by 500 BC these cities possessed monumental architecture, including large temples with elaborate stucco façades.
20
+
21
+
22
+ Hieroglyphic writing was being used in the Maya region by the 3rd century BC. In the Late Preclassic a number of large cities developed in the Petén Basin, and the city of Kaminaljuyu rose to prominence in the Guatemalan Highlands.
23
+
24
+
25
+ Beginning around 250 AD, the Classic period is largely defined as when the Maya were raising sculpted monuments with Long Count dates. This period saw the Maya civilization develop many city-states linked by a complex trade network. In the Maya Lowlands two great rivals, the cities of Tikal and Calakmul, became powerful.
26
+
27
+
28
+ The Classic period also saw the intrusive intervention of the central Mexican city of Teotihuacan in Maya dynastic politics. In the 9th century, there was a widespread political collapse in the central Maya region, resulting in internecine warfare, the abandonment of cities, and a northward shift of population.
29
+
30
+
31
+ The Postclassic period saw the rise of Chichen Itza in the north, and the expansion of the aggressive Kʼicheʼ kingdom in the Guatemalan Highlands. In the 16th century, the Spanish Empire colonised the Mesoamerican region, and a lengthy series of campaigns saw the fall of Nojpetén, the last Maya city, in 1697.
32
+
33
+ Rule during the Classic period centred on the concept of the "divine king", who was thought to act as a mediator between mortals and the supernatural realm. Kingship was patrilineal, and power normally passed to the eldest son. A prospective king was expected to be a successful war leader as well as a ruler.
34
+
35
+
36
+ Closed patronage systems were the dominant force in Maya politics, although how patronage affected the political makeup of a kingdom varied from city-state to city-state. By the Late Classic period, the aristocracy had grown in size, reducing the previously exclusive power of the king.
37
+
38
+
39
+ The Maya developed sophisticated art forms using both perishable and non-perishable materials, including wood, jade, obsidian, ceramics, sculpted stone monuments, stucco, and finely painted murals.
40
+
41
+
42
+ Maya cities tended to expand organically. The city centers comprised ceremonial and administrative complexes, surrounded by an irregularly shaped sprawl of residential districts. Different parts of a city were often linked by causeways.
43
+
44
+
45
+ Architecturally, city buildings included palaces, pyramid-temples, ceremonial ballcourts, and structures specially aligned for astronomical observation. The Maya elite were literate, and developed a complex system of hieroglyphic writing.
46
+
47
+
48
+ Theirs was the most advanced writing system in the pre-Columbian Americas. The Maya recorded their history and ritual knowledge in screenfold books, of which only three uncontested examples remain, the rest having been destroyed by the Spanish. In addition, a great many examples of Maya texts can be found on stelae and ceramics.
49
+
50
+
51
+ The Maya developed a highly complex series of interlocking ritual calendars, and employed mathematics that included one of the earliest known instances of the explicit zero in human history. As a part of their religion, the Maya practised human sacrifice.