Skip to content

Commit

Permalink
[exa]
Browse files Browse the repository at this point in the history
  • Loading branch information
Kye committed Mar 29, 2024
1 parent cdf2bef commit 45bf64c
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions servers/cogvlm/cogvlm.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,7 @@
from swarms_cloud.calculate_pricing import calculate_pricing, count_tokens
from swarms_cloud.auth_with_swarms_cloud import fetch_api_key_info
from swarms_cloud.log_api_request_to_supabase import log_to_supabase, ModelAPILogEntry

# from exa import calculate_workers
# import torch.distributed as dist

from exa.structs.parallelize_models_gpus import prepare_model_for_ddp_inference

# Load environment variables from .env file
load_dotenv()
Expand Down Expand Up @@ -92,8 +89,9 @@
torch_dtype=torch_type,
low_cpu_mem_usage=True,
quantization_config=bnb_config,
).eval()
)#.eval()

model = prepare_model_for_ddp_inference(model)

# Torch type
if torch.cuda.is_available() and torch.cuda.get_device_capability()[0] >= 8:
Expand Down

0 comments on commit 45bf64c

Please sign in to comment.