Downloads · 30 days
8
7% of all-time downloads
ZombitX64/GPT4All-Model
GPT4All-Model is a machine learning model from ZombitX64. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
This folder contains the files needed to load and run the custom Hanuman model.
Downloads · 30 days
8
7% of all-time downloads
All-time downloads
110
Public
Repo size
242 MB
Likes
0
Public
Click a slice to open those files.
.bin242 MB · 98%
From the Hugging Face model README
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 — custom Hanuman 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:
Hanuman) — users must keep modeling.py or use the provided hanuman_loader.py that dynamically imports it.