HowWebWorks commited on
Commit
79e137c
·
1 Parent(s): ed658dd

put everything in root

Browse files
model/README.md → README.md RENAMED
File without changes
model/added_tokens.json → added_tokens.json RENAMED
File without changes
model/config.json → config.json RENAMED
File without changes
model/configuration_intern_vit.py → configuration_intern_vit.py RENAMED
File without changes
model/configuration_internlm2.py → configuration_internlm2.py RENAMED
File without changes
model/configuration_internvl_chat.py → configuration_internvl_chat.py RENAMED
File without changes
model/conversation.py → conversation.py RENAMED
File without changes
model/generation_config.json → generation_config.json RENAMED
File without changes
handler.py CHANGED
@@ -7,14 +7,13 @@ class EndpointHandler:
7
  """Custom handler for NuExtract-2-8B (InternLM2 based)."""
8
 
9
  def __init__(self, path: str = "") -> None:
10
- model_path = os.path.join(path, "model")
11
  # ↓↓↓ allow the repo’s custom configuration & modelling code
12
  self.tokenizer = AutoTokenizer.from_pretrained(
13
- model_path,
14
  trust_remote_code=True # ← mandatory
15
  )
16
  self.model = AutoModelForCausalLM.from_pretrained(
17
- model_path,
18
  trust_remote_code=True, # ← mandatory
19
  torch_dtype=torch.float16, # fits on a 16 GB GPU
20
  device_map="auto" # put tensors on the GPU
 
7
  """Custom handler for NuExtract-2-8B (InternLM2 based)."""
8
 
9
  def __init__(self, path: str = "") -> None:
 
10
  # ↓↓↓ allow the repo’s custom configuration & modelling code
11
  self.tokenizer = AutoTokenizer.from_pretrained(
12
+ path,
13
  trust_remote_code=True # ← mandatory
14
  )
15
  self.model = AutoModelForCausalLM.from_pretrained(
16
+ path,
17
  trust_remote_code=True, # ← mandatory
18
  torch_dtype=torch.float16, # fits on a 16 GB GPU
19
  device_map="auto" # put tensors on the GPU
model/model-00001-of-00004.safetensors → model-00001-of-00004.safetensors RENAMED
File without changes
model/model-00002-of-00004.safetensors → model-00002-of-00004.safetensors RENAMED
File without changes
model/model-00003-of-00004.safetensors → model-00003-of-00004.safetensors RENAMED
File without changes
model/model-00004-of-00004.safetensors → model-00004-of-00004.safetensors RENAMED
File without changes
model/model.safetensors.index.json → model.safetensors.index.json RENAMED
File without changes
model/modeling_intern_vit.py → modeling_intern_vit.py RENAMED
File without changes
model/modeling_internlm2.py → modeling_internlm2.py RENAMED
File without changes
model/modeling_internvl_chat.py → modeling_internvl_chat.py RENAMED
File without changes
model/special_tokens_map.json → special_tokens_map.json RENAMED
File without changes
model/tokenization_internlm2.py → tokenization_internlm2.py RENAMED
File without changes
model/tokenizer.model → tokenizer.model RENAMED
File without changes
model/tokenizer_config.json → tokenizer_config.json RENAMED
File without changes