Add safetensors weights and config
Browse filesFiles changed (3)
- README.md+11-7
- config.jsonAdded+8
- model.safetensorsAdded+3
2 unmodified lines34567891011121314153 unmodified lines192021222324252627282930313233343536372 unmodified lineslanguage: entags:- pytorch- text-generation- tiny---# Tiny LLM 2## 👉 [Click here to chat with it](https://huggingface.co/spaces/filipcode12/NerualLabs)A 4,843,596-parameter character-level GPT, trained from scratch for 8.3 hours on a CPUusing one million generated short conversations.3 unmodified lineson 1,500 held-back test questions. Outside those skills it gives odd answers.- 6 transformer layers, 8 attention heads, width 256, context of 256 characters- `model.pt` holds the weights, the character list and the config- `model.py` holds the model code## Use```pythonimport torchfrom model import TinyGPTck = torch.load("model.pt", map_location="cpu")chars = ck["chars"]model = TinyGPT(len(chars), **ck["config"])model.load_state_dict(ck["state_dict"])model.eval()prompt = "User: what is the capital of Greece\nBot:"2 unmodified lines3456789101112131415163 unmodified lines202122232425262728293031323334353637383940412 unmodified lineslanguage: entags:- pytorch- safetensors- text-generation- tiny---# Erdenel.1## 👉 [Click here to chat with it](https://huggingface.co/spaces/Neural-Labs/Erdenel)A 4,843,596-parameter character-level GPT, trained from scratch for 8.3 hours on a CPUusing one million generated short conversations.3 unmodified lineson 1,500 held-back test questions. Outside those skills it gives odd answers.- 6 transformer layers, 8 attention heads, width 256, context of 256 characters- `model.safetensors` holds the weights- `config.json` holds the character list and the model settings- `model.py` holds the model code## Use```pythonimport jsonimport torchfrom safetensors.torch import load_filefrom model import TinyGPTcfg = json.load(open("config.json"))chars = cfg.pop("chars")model = TinyGPT(len(chars), **cfg)model.load_state_dict(load_file("model.safetensors"))model.eval()prompt = "User: what is the capital of Greece\nBot:"
12345678{ "chars": "\n !\"'*+,-./0123456789:=?ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", "block_size": 256, "n_layer": 6, "n_head": 8, "n_embd": 256, "dropout": 0.0}123version https://git-lfs.github.com/spec/v1oid sha256:06306aca9674e04018fce8ad3fc416b1601844ee2c6be0f82a27f905ff1de4b1size 19381160README.md+11-7
config.jsonAdded+8
model.safetensorsAdded+3