Spaces:
Sleeping
Sleeping
local models
Browse files- app_local.py +4 -34
app_local.py
CHANGED
@@ -10,38 +10,6 @@ from llama_cpp_agent.providers import LlamaCppPythonProvider
|
|
10 |
from llama_cpp_agent.chat_history import BasicChatHistory
|
11 |
from llama_cpp_agent.chat_history.messages import Roles
|
12 |
import gradio as gr
|
13 |
-
from huggingface_hub import hf_hub_download
|
14 |
-
|
15 |
-
huggingface_token = os.getenv("HUGGINGFACE_TOKEN")
|
16 |
-
|
17 |
-
#hf_hub_download(
|
18 |
-
# repo_id="Qwen/Qwen2-0.5B-Instruct-GGUF",
|
19 |
-
# filename="qwen2-0_5b-instruct-q4_k_m.gguf",
|
20 |
-
# local_dir="./models"
|
21 |
-
#)
|
22 |
-
|
23 |
-
#hf_hub_download(
|
24 |
-
# repo_id="TobDeBer/gpt2-Q4_K_M-GGUF",
|
25 |
-
# filename="gpt2-q4_k_m.gguf",
|
26 |
-
# local_dir="./models"
|
27 |
-
#)
|
28 |
-
|
29 |
-
#hf_hub_download(
|
30 |
-
# repo_id="TobDeBer/Meta-Llama-3.1-8B-Instruct-Q4_K_M-GGUF",
|
31 |
-
# filename="meta-llama-3.1-8b-instruct-q4_k_m.gguf",
|
32 |
-
# local_dir="./models",
|
33 |
-
# token=huggingface_token
|
34 |
-
#)
|
35 |
-
# 5GB
|
36 |
-
|
37 |
-
|
38 |
-
# RichardErkhov/ibm-granite_-_granite-7b-base-gguf
|
39 |
-
# granite-7b-base.Q4_K_M.gguf
|
40 |
-
# 4GB
|
41 |
-
|
42 |
-
# TobDeBer/granite-8b-code-instruct-128k-Q4_K_M-GGUF
|
43 |
-
# granite-8b-code-instruct-128k-q4_k_m.gguf
|
44 |
-
# 5GB
|
45 |
|
46 |
llm = None
|
47 |
llm_model = None
|
@@ -128,8 +96,10 @@ model_selection = gr.Interface(
|
|
128 |
inputs=[
|
129 |
gr.Dropdown([
|
130 |
'qwen2-0_5b-instruct-q4_k_m.gguf',
|
131 |
-
'
|
132 |
-
'
|
|
|
|
|
133 |
],
|
134 |
value="qwen2-0_5b-instruct-q4_k_m.gguf",
|
135 |
label="Model"
|
|
|
10 |
from llama_cpp_agent.chat_history import BasicChatHistory
|
11 |
from llama_cpp_agent.chat_history.messages import Roles
|
12 |
import gradio as gr
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
|
14 |
llm = None
|
15 |
llm_model = None
|
|
|
96 |
inputs=[
|
97 |
gr.Dropdown([
|
98 |
'qwen2-0_5b-instruct-q4_k_m.gguf',
|
99 |
+
'mistrallite.Q4_K_M.gguf',
|
100 |
+
'zephyr_Q3_K.gguf',
|
101 |
+
'zephyr_Q3_K_M.gguf',
|
102 |
+
'zephyr_int8.gguf',
|
103 |
],
|
104 |
value="qwen2-0_5b-instruct-q4_k_m.gguf",
|
105 |
label="Model"
|