Spaces:
Sleeping
Sleeping
dtpye depreciation + pytorch cpu
Browse files- app.py +1 -1
- requirements.txt +2 -1
app.py
CHANGED
|
@@ -20,7 +20,7 @@ app = FastAPI()
|
|
| 20 |
base_model = AutoModelForCausalLM.from_pretrained(
|
| 21 |
MODEL,
|
| 22 |
token=HF_TOKEN,
|
| 23 |
-
|
| 24 |
device_map="cpu",
|
| 25 |
low_cpu_mem_usage=True
|
| 26 |
)
|
|
|
|
| 20 |
base_model = AutoModelForCausalLM.from_pretrained(
|
| 21 |
MODEL,
|
| 22 |
token=HF_TOKEN,
|
| 23 |
+
dtype=torch.float32, #huggingface free tier only has cpu
|
| 24 |
device_map="cpu",
|
| 25 |
low_cpu_mem_usage=True
|
| 26 |
)
|
requirements.txt
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
|
|
|
|
|
| 1 |
peft
|
| 2 |
gradio
|
| 3 |
transformers
|
| 4 |
accelerate
|
| 5 |
-
torch
|
| 6 |
fastapi
|
| 7 |
pydantic
|
|
|
|
| 1 |
+
--extra-index-url https://download.pytorch.org/whl/cpu
|
| 2 |
+
torch
|
| 3 |
peft
|
| 4 |
gradio
|
| 5 |
transformers
|
| 6 |
accelerate
|
|
|
|
| 7 |
fastapi
|
| 8 |
pydantic
|