ffreemt commited on
Commit
916dc13
1 Parent(s): 0238de3
Files changed (4) hide show
  1. .gitignore +9 -0
  2. .stignore +101 -0
  3. app.py +13 -4
  4. poetry.lock +32 -0
.gitignore CHANGED
@@ -1 +1,10 @@
1
  call-activate.bat
 
 
 
 
 
 
 
 
 
 
1
  call-activate.bat
2
+ okteto.yml
3
+ okteto-up.bat
4
+ install-sw.sh
5
+ install-sw1.sh
6
+ start-sshd.sh
7
+ pyproject.toml
8
+ models
9
+ .ruff_cache
10
+ run-nodemon.sh
.stignore ADDED
@@ -0,0 +1,101 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .git
2
+ # Byte-compiled / optimized / DLL files
3
+ __pycache__
4
+ *.py[cod]
5
+ *$py.class
6
+
7
+ # C extensions
8
+ *.so
9
+
10
+ # Distribution / packaging
11
+ .Python
12
+ build
13
+ develop-eggs
14
+ dist
15
+ downloads
16
+ eggs
17
+ .eggs
18
+ lib
19
+ lib64
20
+ parts
21
+ sdist
22
+ var
23
+ wheels
24
+ pip-wheel-metadata
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
+ # Translations
42
+ *.mo
43
+ *.pot
44
+
45
+ # Django stuff:
46
+ *.log
47
+ local_settings.py
48
+ db.sqlite3
49
+
50
+ # Flask stuff:
51
+ instance
52
+ .webassets-cache
53
+
54
+ # Scrapy stuff:
55
+ .scrapy
56
+
57
+ # Sphinx documentation
58
+ docs/_build
59
+
60
+ # PyBuilder
61
+ target
62
+
63
+ # Jupyter Notebook
64
+ .ipynb_checkpoints
65
+
66
+ # IPython
67
+ profile_default
68
+ ipython_config.py
69
+
70
+ # pyenv
71
+ .python-version
72
+
73
+ # celery beat schedule file
74
+ celerybeat-schedule
75
+
76
+ # SageMath parsed files
77
+ *.sage.py
78
+
79
+ # Environments
80
+ .env
81
+ .venv
82
+ env
83
+ venv
84
+ ENV
85
+ env.bak
86
+ venv.bak
87
+
88
+ # Spyder project settings
89
+ .spyderproject
90
+ .spyproject
91
+
92
+ # Rope project settings
93
+ .ropeproject
94
+
95
+ # mypy
96
+ .mypy_cache
97
+ .dmypy.json
98
+ dmypy.json
99
+
100
+ # Pyre type checker
101
+ .pyre
app.py CHANGED
@@ -1,5 +1,6 @@
1
  """Run codes"""
2
  # pylint: disable=line-too-long, broad-exception-caught, invalid-name, missing-function-docstring, too-many-instance-attributes, missing-class-docstring
 
3
  # import gradio
4
 
5
  # gradio.load("models/WizardLM/WizardCoder-15B-V1.0").launch()
@@ -189,12 +190,20 @@ mpt-30b-chat.ggmlv0.q8_0.bin q8_0 8 31.83 GB 34.33 GB
189
  MODEL_FILENAME = "mpt-30b-chat.ggmlv0.q4_1.bin"
190
  MODEL_FILENAME = "WizardCoder-15B-1.0.ggmlv3.q4_0.bin" # 10.7G
191
  MODEL_FILENAME = "WizardCoder-15B-1.0.ggmlv3.q4_1.bin" # 11.9G
 
 
 
 
 
192
  DESTINATION_FOLDER = "models"
193
 
194
  REPO_ID = "TheBloke/mpt-30B-chat-GGML"
195
  if "WizardCoder" in MODEL_FILENAME:
196
  REPO_ID = "TheBloke/WizardCoder-15B-1.0-GGML"
197
 
 
 
 
198
  download_quant(DESTINATION_FOLDER, REPO_ID, MODEL_FILENAME)
199
 
200
  logger.info("done dl")
@@ -228,10 +237,10 @@ if "WizardCoder" in MODEL_FILENAME:
228
  threads=os.cpu_count() // 2, # type: ignore
229
  )
230
  # LLM = AutoModelForCausalLM.from_pretrained(
231
- # "TheBloke/WizardCoder-15B-1.0-GGML",
232
- # model_file=MODEL_FILENAME,
233
- # model_type="starcoder",
234
- # threads=os.cpu_count() // 2 # type: ignore
235
  # )
236
 
237
  cpu_count = os.cpu_count() // 2 # type: ignore
 
1
  """Run codes"""
2
  # pylint: disable=line-too-long, broad-exception-caught, invalid-name, missing-function-docstring, too-many-instance-attributes, missing-class-docstring
3
+ # r uff: noqa: E501
4
  # import gradio
5
 
6
  # gradio.load("models/WizardLM/WizardCoder-15B-V1.0").launch()
 
190
  MODEL_FILENAME = "mpt-30b-chat.ggmlv0.q4_1.bin"
191
  MODEL_FILENAME = "WizardCoder-15B-1.0.ggmlv3.q4_0.bin" # 10.7G
192
  MODEL_FILENAME = "WizardCoder-15B-1.0.ggmlv3.q4_1.bin" # 11.9G
193
+ MODEL_FILENAME = "WizardCoder-15B-1.0.ggmlv3.q4_1.bin" # 11.9G
194
+
195
+ # https://huggingface.co/TheBloke/WizardLM-13B-V1.0-Uncensored-GGML
196
+ MODEL_FILENAME = "wizardlm-13b-v1.0-uncensored.ggmlv3.q4_1.bin"
197
+
198
  DESTINATION_FOLDER = "models"
199
 
200
  REPO_ID = "TheBloke/mpt-30B-chat-GGML"
201
  if "WizardCoder" in MODEL_FILENAME:
202
  REPO_ID = "TheBloke/WizardCoder-15B-1.0-GGML"
203
 
204
+ if "uncensored" in MODEL_FILENAME.lower():
205
+ REPO_ID = "TheBloke/WizardLM-13B-V1.0-Uncensored-GGML"
206
+
207
  download_quant(DESTINATION_FOLDER, REPO_ID, MODEL_FILENAME)
208
 
209
  logger.info("done dl")
 
237
  threads=os.cpu_count() // 2, # type: ignore
238
  )
239
  # LLM = AutoModelForCausalLM.from_pretrained(
240
+ # "TheBloke/WizardCoder-15B-1.0-GGML",
241
+ # model_file=MODEL_FILENAME,
242
+ # model_type="starcoder",
243
+ # threads=os.cpu_count() // 2 # type: ignore
244
  # )
245
 
246
  cpu_count = os.cpu_count() // 2 # type: ignore
poetry.lock ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # This file is automatically @generated by Poetry 1.5.1 and should not be changed by hand.
2
+
3
+ [[package]]
4
+ name = "ruff"
5
+ version = "0.0.277"
6
+ description = "An extremely fast Python linter, written in Rust."
7
+ optional = false
8
+ python-versions = ">=3.7"
9
+ files = [
10
+ {file = "ruff-0.0.277-py3-none-macosx_10_7_x86_64.whl", hash = "sha256:3250b24333ef419b7a232080d9724ccc4d2da1dbbe4ce85c4caa2290d83200f8"},
11
+ {file = "ruff-0.0.277-py3-none-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:3e60605e07482183ba1c1b7237eca827bd6cbd3535fe8a4ede28cbe2a323cb97"},
12
+ {file = "ruff-0.0.277-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7baa97c3d7186e5ed4d5d4f6834d759a27e56cf7d5874b98c507335f0ad5aadb"},
13
+ {file = "ruff-0.0.277-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:74e4b206cb24f2e98a615f87dbe0bde18105217cbcc8eb785bb05a644855ba50"},
14
+ {file = "ruff-0.0.277-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:479864a3ccd8a6a20a37a6e7577bdc2406868ee80b1e65605478ad3b8eb2ba0b"},
15
+ {file = "ruff-0.0.277-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:468bfb0a7567443cec3d03cf408d6f562b52f30c3c29df19927f1e0e13a40cd7"},
16
+ {file = "ruff-0.0.277-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f32ec416c24542ca2f9cc8c8b65b84560530d338aaf247a4a78e74b99cd476b4"},
17
+ {file = "ruff-0.0.277-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:14a7b2f00f149c5a295f188a643ac25226ff8a4d08f7a62b1d4b0a1dc9f9b85c"},
18
+ {file = "ruff-0.0.277-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a9879f59f763cc5628aa01c31ad256a0f4dc61a29355c7315b83c2a5aac932b5"},
19
+ {file = "ruff-0.0.277-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:f612e0a14b3d145d90eb6ead990064e22f6f27281d847237560b4e10bf2251f3"},
20
+ {file = "ruff-0.0.277-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:323b674c98078be9aaded5b8b51c0d9c424486566fb6ec18439b496ce79e5998"},
21
+ {file = "ruff-0.0.277-py3-none-musllinux_1_2_i686.whl", hash = "sha256:3a43fbe026ca1a2a8c45aa0d600a0116bec4dfa6f8bf0c3b871ecda51ef2b5dd"},
22
+ {file = "ruff-0.0.277-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:734165ea8feb81b0d53e3bf523adc2413fdb76f1264cde99555161dd5a725522"},
23
+ {file = "ruff-0.0.277-py3-none-win32.whl", hash = "sha256:88d0f2afb2e0c26ac1120e7061ddda2a566196ec4007bd66d558f13b374b9efc"},
24
+ {file = "ruff-0.0.277-py3-none-win_amd64.whl", hash = "sha256:6fe81732f788894a00f6ade1fe69e996cc9e485b7c35b0f53fb00284397284b2"},
25
+ {file = "ruff-0.0.277-py3-none-win_arm64.whl", hash = "sha256:2d4444c60f2e705c14cd802b55cd2b561d25bf4311702c463a002392d3116b22"},
26
+ {file = "ruff-0.0.277.tar.gz", hash = "sha256:2dab13cdedbf3af6d4427c07f47143746b6b95d9e4a254ac369a0edb9280a0d2"},
27
+ ]
28
+
29
+ [metadata]
30
+ lock-version = "2.0"
31
+ python-versions = "^3.10"
32
+ content-hash = "77e126307b76159c5074d4da52df1eeb7417c6f71fdb779227f1496220ec7617"