HowWebWorks commited on
Commit Β·
79e137c
1
Parent(s): ed658dd
put everything in root
Browse filesFiles changed (21)
- model/README.md β README.mdRenamed
- model/added_tokens.json β added_tokens.jsonRenamed
- model/config.json β config.jsonRenamed
- model/configuration_intern_vit.py β configuration_intern_vit.pyRenamed
- model/configuration_internlm2.py β configuration_internlm2.pyRenamed
- model/configuration_internvl_chat.py β configuration_internvl_chat.pyRenamed
- model/conversation.py β conversation.pyRenamed
- model/generation_config.json β generation_config.jsonRenamed
- handler.py+2-3
- model/model-00001-of-00004.safetensors β model-00001-of-00004.safetensorsRenamed
- model/model-00002-of-00004.safetensors β model-00002-of-00004.safetensorsRenamed
- model/model-00003-of-00004.safetensors β model-00003-of-00004.safetensorsRenamed
- model/model-00004-of-00004.safetensors β model-00004-of-00004.safetensorsRenamed
- model/model.safetensors.index.json β model.safetensors.index.jsonRenamed
- model/modeling_intern_vit.py β modeling_intern_vit.pyRenamed
- model/modeling_internlm2.py β modeling_internlm2.pyRenamed
- model/modeling_internvl_chat.py β modeling_internvl_chat.pyRenamed
- model/special_tokens_map.json β special_tokens_map.jsonRenamed
- model/tokenization_internlm2.py β tokenization_internlm2.pyRenamed
- model/tokenizer.model β tokenizer.modelRenamed
- model/tokenizer_config.json β tokenizer_config.jsonRenamed
6 unmodified lines78910111213141516171819206 unmodified lines"""Custom handler for NuExtract-2-8B (InternLM2 based)."""def __init__(self, path: str = "") -> None:model_path = os.path.join(path, "model")# βββ allow the repoβs custom configuration & modelling codeself.tokenizer = AutoTokenizer.from_pretrained(model_path,trust_remote_code=True # β mandatory)self.model = AutoModelForCausalLM.from_pretrained(model_path,trust_remote_code=True, # β mandatorytorch_dtype=torch.float16, # fits on a 16 GB GPUdevice_map="auto" # put tensors on the GPU6 unmodified lines789101112131415161718196 unmodified lines"""Custom handler for NuExtract-2-8B (InternLM2 based)."""def __init__(self, path: str = "") -> None:# βββ allow the repoβs custom configuration & modelling codeself.tokenizer = AutoTokenizer.from_pretrained(path,trust_remote_code=True # β mandatory)self.model = AutoModelForCausalLM.from_pretrained(path,trust_remote_code=True, # β mandatorytorch_dtype=torch.float16, # fits on a 16 GB GPUdevice_map="auto" # put tensors on the GPU
model/README.md β README.mdRenamed
model/added_tokens.json β added_tokens.jsonRenamed
model/config.json β config.jsonRenamed
model/configuration_intern_vit.py β configuration_intern_vit.pyRenamed
model/configuration_internlm2.py β configuration_internlm2.pyRenamed
model/configuration_internvl_chat.py β configuration_internvl_chat.pyRenamed
model/conversation.py β conversation.pyRenamed
model/generation_config.json β generation_config.jsonRenamed
handler.py+2-3
model/model-00001-of-00004.safetensors β model-00001-of-00004.safetensorsRenamed
model/model-00002-of-00004.safetensors β model-00002-of-00004.safetensorsRenamed
model/model-00003-of-00004.safetensors β model-00003-of-00004.safetensorsRenamed
model/model-00004-of-00004.safetensors β model-00004-of-00004.safetensorsRenamed
model/model.safetensors.index.json β model.safetensors.index.jsonRenamed
model/modeling_intern_vit.py β modeling_intern_vit.pyRenamed
model/modeling_internlm2.py β modeling_internlm2.pyRenamed
model/modeling_internvl_chat.py β modeling_internvl_chat.pyRenamed
model/special_tokens_map.json β special_tokens_map.jsonRenamed
model/tokenization_internlm2.py β tokenization_internlm2.pyRenamed
model/tokenizer.model β tokenizer.modelRenamed
model/tokenizer_config.json β tokenizer_config.jsonRenamed