jsource
tinygrad
Our great sponsors
jsource | tinygrad | |
---|---|---|
18 | 17 | |
631 | 23,232 | |
2.7% | 4.8% | |
9.7 | 9.9 | |
1 day ago | 3 days ago | |
C | Python | |
GNU General Public License v3.0 or later | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
jsource
-
Crafting Self-Evident Code with D
The one other example I know that morphs the language to that extent and to the detriment of readability by C programmers is the J interpreter[1,2]. But, once again, nobody (that I’ve read) claims it’s good or clear C. (Good C for those who speak J, maybe; I wouldn’t know.)
For a way to morph C syntax that does make things better, see libmill[3].
[1] https://code.jsoftware.com/wiki/Essays/Incunabulum
- Show HN: Gemini client in 100 lines of C
-
Want cleaner code? Use the rule of six
No, it was rhetorical, because it's obviously (to an APL-family programmer), not bad!
Your cultural prejudice is showing. There are good reasons APL is written the way it is, and this example is simply bringing those benefits to C by writing it in the dense APL style. There are other APL derivatives, like J[1] that are written the same way. These projects are well-maintained. They aren't collapsing under a load of technical debt. The style works. To them, it's clean code.
-
Jd
You can view the code, but is not open source: https://github.com/jsoftware/jsource/blob/master/license.txt
-
Someone earlier linked to Arthur Whitney's style of coding in the comments. Can we discuss this further? I am disturbed by what I saw.
This is the same dense style used in J.
-
Why does old C code often declare functions or global variables in the scope it's used, rather than at the top of a source file or a header file?
All-in-all this example doesn't seem too bad. It's clear what happens and is easy to follow. If you wan't to see something remarkably terribly, check out Whitney style. It's used in APL/J/K family interpreters. Keep in mind, financial institutions run that code.
- Ask HN: Examples of Unusual Code Formatting Styles?
-
if you code in J for 6 months, you will no longer think in loops, and if you stay with it for 2 years, you will see that looping code was an artifact of early programming languages, ready to be displayed in museums along with vacuum tubes
good first issue
tinygrad
-
AMD Unveils Ryzen 8000G Series Processors: Zen 4 APUs for Desktop with Ryzen AI
Not sure if I completely understand what "Ryzen AI" does, but Tinygrad for example has some limited support for RDNA3[0]. It isn't quite there yet in matters of performance though, as you can read in the comments of that file.
There's also a small tutorial by AMD on how to use the WMMA intrinsic[1] using AMD's hipcc[2] compiler. Documentation is sparse kinda sparse, but the instruction set is not huge. The RDNA3 ISA guide[3] might also be helpful (and only a fraction of the pages are relevant.)
0. https://github.com/tinygrad/tinygrad/blob/master/extra/gemm/...
1. https://gpuopen.com/learn/wmma_on_rdna3/
2. https://github.com/ROCm/HIPCC
3. https://www.amd.com/content/dam/amd/en/documents/radeon-tech...
-
Beyond Backpropagation - Higher Order, Forward and Reverse-mode Automatic Differentiation for Tensorken
This post describes how I added automatic differentiation to Tensorken. Tensorken is my attempt to build a fully featured yet easy-to-understand and hackable implementation of a deep learning library in Rust. It takes inspiration from the likes of PyTorch, Tinygrad, and JAX.
-
[D] What is a good way to maintain code readability and code quality while scaling up complexity in libraries like Hugging Face?
what do you think about tinygrad? I think its a good example of growing and well written, (partially) well documented library with many close to reference implementations
-
💻 7 Open-Source DevTools That Save Time You Didn't Know to Exist ⌛🚀
🌟 Support on GitHub Website: https://tinygrad.org/
-
Decomposing Language Models into Understandable Components
Try to get something like tinygrad[1] running locally, that way you can tweak things a bit run it again and see how it performs. While doing this you'll pick up most of the concepts and get a feeling of how things work. Also, take a look at projects like llama.cpp[2], you don't have to fully understand what's going on here, tho.
You may need some intermediate knowledge of linear algebra and this thing called "data science" nowadays, which is pretty much knowing how to mangle data and visualize it.
Try creating a small model on your own, it doesn't have to be super fancy just make sure it does something you want it to do. And then ... you'll probably could go on your own then.
- Stable Diffusion in pure C/C++
-
There is no hard takeoff
lol, you should see me bash my own code. I'm even more mean.
https://github.com/tinygrad/tinygrad/blob/master/examples/hl...
have a bunch of bounties on it, we're getting 94%+ now! mostly not me who wrote this, see history. have to switch to float16 and add Winograd convs still. we have a branch with multigpu too.
goal is to beat an A100 in speed on a tinybox.
-
MatX: Faster Chips for LLMs
AMD drivers are a higher priority but he also made tinygrad https://github.com/tinygrad/tinygrad
-
[Project] Whisper Implementation in Rust using burn
I temporarily switched from Rust to Python for machine learning, but quickly became fed up with Python's annoying versioning issues and runtime errors. I looked for a better path to machine learning and discovered burn, a deep learning framework for Rust. As my first burn project I decided to port OpenAI's Whisper transcription model. The project can be found at Gadersd/whisper-burn: A Rust implementation of OpenAI's Whisper model using the burn framework (github.com). I based it on the excellently concise tinygrad implementation that can be found here. The tinygrad version begrudgingly uses Torch's stft which I ported into a pure Rust short time Fourier transform along with the mel scale frequency conversion matrix function because I am curious and just a bit masochistic.
-
Onnx Runtime: “Cross-Platform Accelerated Machine Learning”
Be better to use https://github.com/tinygrad/tinygrad as an intermediary framework?
What are some alternatives?
Pytorch - Tensors and Dynamic neural networks in Python with strong GPU acceleration
jax - Composable transformations of Python+NumPy programs: differentiate, vectorize, JIT to GPU/TPU, and more
llama.cpp - LLM inference in C/C++
tinygrad - You like pytorch? You like micrograd? You love tinygrad! ❤️ [Moved to: https://github.com/tinygrad/tinygrad]
llama - Inference code for Llama models
openpilot - openpilot is an open source driver assistance system. openpilot performs the functions of Automated Lane Centering and Adaptive Cruise Control for 250+ supported car makes and models.
tensorflow_macos - TensorFlow for macOS 11.0+ accelerated using Apple's ML Compute framework.
stable-diffusion.cpp - Stable Diffusion in pure C/C++
b-decoded - arthur whitney's b interpreter translated into a more traditional flavor of C
kdb - Companion files to kdb+ and q
hlb-CIFAR10 - Train CIFAR-10 in <7 seconds on an A100, the current world record.
ancient-c-compilers - Very old C compilers