khrek commited on
Commit
334c45a
1 Parent(s): 15d0f45

Update models.py

Browse files
Files changed (1) hide show
  1. models.py +1 -1
models.py CHANGED
@@ -18,7 +18,7 @@ class Models():
18
  #is it best to keep in memory why not pickle?
19
  checkpoint = "Universal-NER/UniNER-7B-all"
20
 
21
- ner_model = AutoModelForCausalLM.from_pretrained(checkpoint, device_map="auto", torch_dtype=torch.float16, offload_folder="offload", offload_state_dict = True)
22
  tokenizer = AutoTokenizer.from_pretrained("Universal-NER/UniNER-7B-all", use_fast=False, padding="max_length")
23
  hf_pipeline = pipeline(
24
  "text-generation", #task
 
18
  #is it best to keep in memory why not pickle?
19
  checkpoint = "Universal-NER/UniNER-7B-all"
20
 
21
+ ner_model = AutoModelForCausalLM.from_pretrained(checkpoint, device_map="auto", torch_dtype=torch.float32, offload_folder="offload", offload_state_dict = True)
22
  tokenizer = AutoTokenizer.from_pretrained("Universal-NER/UniNER-7B-all", use_fast=False, padding="max_length")
23
  hf_pipeline = pipeline(
24
  "text-generation", #task