YAML Metadata
Warning:
empty or missing yaml metadata in repo card
(https://huggingface.co/docs/hub/model-cards#model-card-metadata)
GPT4All-Model (Hanuman)
This folder contains the files needed to load and run the custom Hanuman model.
Included files:
pytorch_model.bin
— model weightsconfig.json
— model configurationtokenizer.json
,tokenizer_config.json
,special_tokens_map.json
— tokenizer filesmodeling.py
— customHanuman
model implementationhanuman_loader.py
— convenience loader (optional)
Quick usage (local files in this folder):
# inference_local.py
from transformers import AutoTokenizer
from modeling import Hanuman
import torch
# load tokenizer from local folder
tokenizer = AutoTokenizer.from_pretrained('.')
# load model using the provided helper
model = Hanuman.from_pretrained('.', map_location='cpu')
prompt = "สวัสดีครับ ช่วยอธิบายสั้น ๆ เกี่ยวกับประเทศไทย"
inputs = tokenizer(prompt, return_tensors='pt')
outputs = model.generate(inputs['input_ids'], max_new_tokens=50, temperature=1.2, top_k=50, top_p=0.95)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Or load from the Hugging Face Hub (if this folder was uploaded to the hub as the repo root):
# inference_from_hub.py
from transformers import AutoTokenizer
from hanuman_loader import HanumanModel
repo_id = "ZombitX64/GPT4All-Model"
# tokenizer will download from HF
tokenizer = AutoTokenizer.from_pretrained(repo_id)
# HanumanModel downloads weights and modeling.py dynamically
model_wrapper = HanumanModel.from_pretrained(repo_id, map_location='cpu')
model = model_wrapper.model
prompt = "สวัสดีครับ ช่วยสรุปประเทศไทยสั้น ๆ"
inputs = tokenizer(prompt, return_tensors='pt')
outputs = model.generate(inputs['input_ids'], max_new_tokens=50)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Notes:
- This repo uses a custom model class (
Hanuman
) — users must keepmodeling.py
or use the providedhanuman_loader.py
that dynamically imports it. - For CPU inference, install a CPU build of PyTorch. For GPU, install the appropriate CUDA-enabled PyTorch.
- Downloads last month
- 42
Inference Providers
NEW
This model isn't deployed by any Inference Provider.
🙋
Ask for provider support