Skip to content

llm: glm 4.5 air#15771

Merged
geohot merged 8 commits intotinygrad:masterfrom
b1tg:llm_glm_45_air
Apr 22, 2026
Merged

llm: glm 4.5 air#15771
geohot merged 8 commits intotinygrad:masterfrom
b1tg:llm_glm_45_air

Conversation

@b1tg
Copy link
Copy Markdown
Contributor

@b1tg b1tg commented Apr 16, 2026

No description provided.

@b1tg
Copy link
Copy Markdown
Contributor Author

b1tg commented Apr 16, 2026

# model on tinyamd2 raid
$ echo "gguf means?" | JITBEAM=2 python -m tinygrad.apps.llm -m /raid/glm/air/GLM-4.5-Air-Q4_K_M-00001-of-00002.gguf
using model "Glm-4.5-Air" with 50,000,746,752 bytes and 106,852,251,264 params
>>> 
<think>We are being asked about the meaning of "GGUF".
 GGUF stands for "GPT-Generated Unified Format". It is a file format designed for storing and distributing large language models (LLMs) in a way that is efficient and portable.

 Key points about GGUF:...

Comment thread tinygrad/nn/state.py Outdated
NOTE: The provided tensor must be on a device that supports execution.
NOTE: Multi-part GGUFs (`split.count > 1`) are merged when loaded from a disk-backed path, all parts must be in the same folder.
"""
src = tensor.device.removeprefix("DISK:") if isinstance(tensor.device, str) and tensor.device.startswith("DISK:") else None
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not the correct abstraction

Comment thread tinygrad/llm/gguf.py Outdated
for pp in _gguf_split_paths(pathlib.Path(fn), kv)[1:]: sd.update(load(pp)[1])
return kv, sd

def gguf_size(path: str|pathlib.Path, kv: dict) -> int:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This shouldn't be a thing

@github-actions
Copy link
Copy Markdown
Contributor

Changes

Name                     Lines    Diff    Tokens/Line    Diff
---------------------  -------  ------  -------------  ------
tinygrad/llm/model.py      335      +6           17.5    -0.1
tinygrad/llm/cli.py        197      -2           15.3    +0.1
tinygrad/llm/gguf.py       133     +11           26.4    -0.3


total lines changes: +15

@geohot geohot merged commit af93a67 into tinygrad:master Apr 22, 2026
51 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants