Spaces:
Paused
Paused
Update llm.py
Browse files
llm.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
-
|
| 2 |
import os
|
| 3 |
-
|
| 4 |
import asyncio
|
| 5 |
from functools import partial
|
| 6 |
import time
|
|
@@ -8,9 +8,10 @@ import torch
|
|
| 8 |
from transformers import AutoProcessor, AutoModelForImageTextToText
|
| 9 |
model_name = "Qwen/Qwen3.5-9B-Base"
|
| 10 |
|
| 11 |
-
|
| 12 |
processor = AutoProcessor.from_pretrained(
|
| 13 |
model_name,
|
|
|
|
| 14 |
trust_remote_code=True
|
| 15 |
)
|
| 16 |
|
|
@@ -18,6 +19,7 @@ model = AutoModelForImageTextToText.from_pretrained(
|
|
| 18 |
model_name,
|
| 19 |
device_map="auto",
|
| 20 |
dtype=torch.float16,
|
|
|
|
| 21 |
trust_remote_code=True
|
| 22 |
)
|
| 23 |
|
|
|
|
| 1 |
+
|
| 2 |
import os
|
| 3 |
+
|
| 4 |
import asyncio
|
| 5 |
from functools import partial
|
| 6 |
import time
|
|
|
|
| 8 |
from transformers import AutoProcessor, AutoModelForImageTextToText
|
| 9 |
model_name = "Qwen/Qwen3.5-9B-Base"
|
| 10 |
|
| 11 |
+
hf_token = os.getenv("HUGGINGFACE_HUB_TOKEN")
|
| 12 |
processor = AutoProcessor.from_pretrained(
|
| 13 |
model_name,
|
| 14 |
+
token=hf_token,
|
| 15 |
trust_remote_code=True
|
| 16 |
)
|
| 17 |
|
|
|
|
| 19 |
model_name,
|
| 20 |
device_map="auto",
|
| 21 |
dtype=torch.float16,
|
| 22 |
+
token=hf_token,
|
| 23 |
trust_remote_code=True
|
| 24 |
)
|
| 25 |
|