Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -65,7 +65,7 @@ async def lifespan(app: FastAPI):
|
|
| 65 |
llm = Llama(
|
| 66 |
model_path=model_path,
|
| 67 |
n_gpu_layers=0, # 0 for CPU execution
|
| 68 |
-
n_ctx=
|
| 69 |
|
| 70 |
# Threading optimizations
|
| 71 |
n_threads=4,
|
|
@@ -75,8 +75,6 @@ async def lifespan(app: FastAPI):
|
|
| 75 |
# ⚡ TURBOQUANT EQUIVALENT SETTINGS:
|
| 76 |
# Quantizing the KV cache to Q4_0 shrinks memory overhead and drastically
|
| 77 |
# reduces RAM bandwidth usage, supercharging CPU generation speeds.
|
| 78 |
-
type_k=getattr(llama_cpp, "GGML_TYPE_Q4_0", 2),
|
| 79 |
-
type_v=getattr(llama_cpp, "GGML_TYPE_Q4_0", 2),
|
| 80 |
|
| 81 |
n_batch=512,
|
| 82 |
n_ubatch=512,
|
|
@@ -89,7 +87,7 @@ async def lifespan(app: FastAPI):
|
|
| 89 |
use_mmap=True,
|
| 90 |
|
| 91 |
# FlashAttention removed as requested
|
| 92 |
-
|
| 93 |
)
|
| 94 |
print("Server ready!")
|
| 95 |
|
|
|
|
| 65 |
llm = Llama(
|
| 66 |
model_path=model_path,
|
| 67 |
n_gpu_layers=0, # 0 for CPU execution
|
| 68 |
+
n_ctx=2048,
|
| 69 |
|
| 70 |
# Threading optimizations
|
| 71 |
n_threads=4,
|
|
|
|
| 75 |
# ⚡ TURBOQUANT EQUIVALENT SETTINGS:
|
| 76 |
# Quantizing the KV cache to Q4_0 shrinks memory overhead and drastically
|
| 77 |
# reduces RAM bandwidth usage, supercharging CPU generation speeds.
|
|
|
|
|
|
|
| 78 |
|
| 79 |
n_batch=512,
|
| 80 |
n_ubatch=512,
|
|
|
|
| 87 |
use_mmap=True,
|
| 88 |
|
| 89 |
# FlashAttention removed as requested
|
| 90 |
+
|
| 91 |
)
|
| 92 |
print("Server ready!")
|
| 93 |
|