Spaces:
Sleeping
Sleeping
NotShrirang
commited on
Commit
·
6caffc3
1
Parent(s):
f4e648b
feat: add weights
Browse files- .gitignore +0 -162
- README.md +28 -15
- app.py +0 -1
- weights/GPT_model_char.pt +3 -0
.gitignore
DELETED
@@ -1,162 +0,0 @@
|
|
1 |
-
# Byte-compiled / optimized / DLL files
|
2 |
-
__pycache__/
|
3 |
-
*.py[cod]
|
4 |
-
*$py.class
|
5 |
-
|
6 |
-
weights/
|
7 |
-
|
8 |
-
# C extensions
|
9 |
-
*.so
|
10 |
-
|
11 |
-
# Distribution / packaging
|
12 |
-
.Python
|
13 |
-
build/
|
14 |
-
develop-eggs/
|
15 |
-
dist/
|
16 |
-
downloads/
|
17 |
-
eggs/
|
18 |
-
.eggs/
|
19 |
-
lib/
|
20 |
-
lib64/
|
21 |
-
parts/
|
22 |
-
sdist/
|
23 |
-
var/
|
24 |
-
wheels/
|
25 |
-
share/python-wheels/
|
26 |
-
*.egg-info/
|
27 |
-
.installed.cfg
|
28 |
-
*.egg
|
29 |
-
MANIFEST
|
30 |
-
|
31 |
-
# PyInstaller
|
32 |
-
# Usually these files are written by a python script from a template
|
33 |
-
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
34 |
-
*.manifest
|
35 |
-
*.spec
|
36 |
-
|
37 |
-
# Installer logs
|
38 |
-
pip-log.txt
|
39 |
-
pip-delete-this-directory.txt
|
40 |
-
|
41 |
-
# Unit test / coverage reports
|
42 |
-
htmlcov/
|
43 |
-
.tox/
|
44 |
-
.nox/
|
45 |
-
.coverage
|
46 |
-
.coverage.*
|
47 |
-
.cache
|
48 |
-
nosetests.xml
|
49 |
-
coverage.xml
|
50 |
-
*.cover
|
51 |
-
*.py,cover
|
52 |
-
.hypothesis/
|
53 |
-
.pytest_cache/
|
54 |
-
cover/
|
55 |
-
|
56 |
-
# Translations
|
57 |
-
*.mo
|
58 |
-
*.pot
|
59 |
-
|
60 |
-
# Django stuff:
|
61 |
-
*.log
|
62 |
-
local_settings.py
|
63 |
-
db.sqlite3
|
64 |
-
db.sqlite3-journal
|
65 |
-
|
66 |
-
# Flask stuff:
|
67 |
-
instance/
|
68 |
-
.webassets-cache
|
69 |
-
|
70 |
-
# Scrapy stuff:
|
71 |
-
.scrapy
|
72 |
-
|
73 |
-
# Sphinx documentation
|
74 |
-
docs/_build/
|
75 |
-
|
76 |
-
# PyBuilder
|
77 |
-
.pybuilder/
|
78 |
-
target/
|
79 |
-
|
80 |
-
# Jupyter Notebook
|
81 |
-
.ipynb_checkpoints
|
82 |
-
|
83 |
-
# IPython
|
84 |
-
profile_default/
|
85 |
-
ipython_config.py
|
86 |
-
|
87 |
-
# pyenv
|
88 |
-
# For a library or package, you might want to ignore these files since the code is
|
89 |
-
# intended to run in multiple environments; otherwise, check them in:
|
90 |
-
# .python-version
|
91 |
-
|
92 |
-
# pipenv
|
93 |
-
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
94 |
-
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
95 |
-
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
96 |
-
# install all needed dependencies.
|
97 |
-
#Pipfile.lock
|
98 |
-
|
99 |
-
# poetry
|
100 |
-
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
101 |
-
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
102 |
-
# commonly ignored for libraries.
|
103 |
-
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
104 |
-
#poetry.lock
|
105 |
-
|
106 |
-
# pdm
|
107 |
-
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
108 |
-
#pdm.lock
|
109 |
-
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
110 |
-
# in version control.
|
111 |
-
# https://pdm.fming.dev/#use-with-ide
|
112 |
-
.pdm.toml
|
113 |
-
|
114 |
-
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
115 |
-
__pypackages__/
|
116 |
-
|
117 |
-
# Celery stuff
|
118 |
-
celerybeat-schedule
|
119 |
-
celerybeat.pid
|
120 |
-
|
121 |
-
# SageMath parsed files
|
122 |
-
*.sage.py
|
123 |
-
|
124 |
-
# Environments
|
125 |
-
.env
|
126 |
-
.venv
|
127 |
-
env/
|
128 |
-
venv/
|
129 |
-
ENV/
|
130 |
-
env.bak/
|
131 |
-
venv.bak/
|
132 |
-
|
133 |
-
# Spyder project settings
|
134 |
-
.spyderproject
|
135 |
-
.spyproject
|
136 |
-
|
137 |
-
# Rope project settings
|
138 |
-
.ropeproject
|
139 |
-
|
140 |
-
# mkdocs documentation
|
141 |
-
/site
|
142 |
-
|
143 |
-
# mypy
|
144 |
-
.mypy_cache/
|
145 |
-
.dmypy.json
|
146 |
-
dmypy.json
|
147 |
-
|
148 |
-
# Pyre type checker
|
149 |
-
.pyre/
|
150 |
-
|
151 |
-
# pytype static type analyzer
|
152 |
-
.pytype/
|
153 |
-
|
154 |
-
# Cython debug symbols
|
155 |
-
cython_debug/
|
156 |
-
|
157 |
-
# PyCharm
|
158 |
-
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
159 |
-
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
160 |
-
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
161 |
-
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
162 |
-
#.idea/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
README.md
CHANGED
@@ -1,3 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
![QuillGPT-cropped-removebg-preview](https://github.com/NotShrirang/QuillGPT/assets/85283622/2e63d8ce-24f8-4bf0-835a-0c621f1d7400)
|
2 |
|
3 |
# QuillGPT
|
@@ -111,21 +124,21 @@ To train the GPT model, follow these steps:
|
|
111 |
2. Write the configurations for transformer and save the file.
|
112 |
<br>For example:
|
113 |
`json
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
|
130 |
3. Train model using script `scripts/train_gpt.py`
|
131 |
|
|
|
1 |
+
---
|
2 |
+
title: QuillGPT
|
3 |
+
emoji: 📉
|
4 |
+
colorFrom: yellow
|
5 |
+
colorTo: yellow
|
6 |
+
sdk: streamlit
|
7 |
+
sdk_version: 1.40.2
|
8 |
+
app_file: app.py
|
9 |
+
pinned: false
|
10 |
+
license: mit
|
11 |
+
short_description: Implementation of the GPT decoder block in PyTorch
|
12 |
+
---
|
13 |
+
|
14 |
![QuillGPT-cropped-removebg-preview](https://github.com/NotShrirang/QuillGPT/assets/85283622/2e63d8ce-24f8-4bf0-835a-0c621f1d7400)
|
15 |
|
16 |
# QuillGPT
|
|
|
124 |
2. Write the configurations for transformer and save the file.
|
125 |
<br>For example:
|
126 |
`json
|
127 |
+
{
|
128 |
+
"data_path": "data/corpus.txt",
|
129 |
+
"vocab_size": 135,
|
130 |
+
"batch_size": 32,
|
131 |
+
"block_size": 256,
|
132 |
+
"max_iters": 3000,
|
133 |
+
"eval_interval": 300,
|
134 |
+
"learning_rate": 3e-5,
|
135 |
+
"eval_iters": 50,
|
136 |
+
"n_embd": 1024,
|
137 |
+
"n_head": 12,
|
138 |
+
"n_layer": 18,
|
139 |
+
"dropout": 0.3,
|
140 |
+
}
|
141 |
+
`
|
142 |
|
143 |
3. Train model using script `scripts/train_gpt.py`
|
144 |
|
app.py
CHANGED
@@ -18,7 +18,6 @@ def decode_text(input, model: GPTLanguageModel, max_tokens, temperature):
|
|
18 |
|
19 |
models = {
|
20 |
"Shakespearean GPT": './weights/GPT_model_char.pt',
|
21 |
-
"GPT": './weights/Harpoon_Corpus_GPT_model_word2.pt',
|
22 |
}
|
23 |
|
24 |
st.sidebar.header('QuillGPT')
|
|
|
18 |
|
19 |
models = {
|
20 |
"Shakespearean GPT": './weights/GPT_model_char.pt',
|
|
|
21 |
}
|
22 |
|
23 |
st.sidebar.header('QuillGPT')
|
weights/GPT_model_char.pt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:3a5f38b0e71d3885796283c4393dfb56980570a230cbb0b62c09d0c7dfa446fd
|
3 |
+
size 52673448
|