poiccard commited on
Commit
91174fb
1 Parent(s): 4f6f950

Update handler.py

Browse files
Files changed (1) hide show
  1. handler.py +1 -1
handler.py CHANGED
@@ -12,7 +12,7 @@ class EndpointHandler():
12
  self.device = "cuda" if torch.cuda.is_available() else "cpu"
13
 
14
  self.tokenizer = AutoTokenizer.from_pretrained(path)
15
- self.model = AutoModelForCausalLM.from_pretrained(path, device_map="auto", trust_remote_code=True)
16
 
17
  def __call__(self, data: Dict[str, Any]) -> List[Dict[str, Any]]:
18
 
 
12
  self.device = "cuda" if torch.cuda.is_available() else "cpu"
13
 
14
  self.tokenizer = AutoTokenizer.from_pretrained(path)
15
+ self.model = AutoModelForCausalLM.from_pretrained(path, device_map="auto", offload_folder='offload', trust_remote_code=True)
16
 
17
  def __call__(self, data: Dict[str, Any]) -> List[Dict[str, Any]]:
18