Spaces:
Runtime error
Runtime error
Create src/utils/shared.py
Browse files- src/utils/shared.py +9 -0
src/utils/shared.py
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from ctransformers import AutoModelForCausalLM
|
2 |
+
|
3 |
+
llm_model = AutoModelForCausalLM.from_pretrained(
|
4 |
+
"TheBloke/zephyr-7B-alpha-GGUF",
|
5 |
+
model_file="zephyr-7b-alpha.Q4_K_M.gguf",
|
6 |
+
model_type="llama",
|
7 |
+
max_new_tokens=256,
|
8 |
+
temperature=0.7
|
9 |
+
)
|