Telegram Bot, OpenAI, and Tinygrad

November 26, 2024 00:02:46
Telegram Bot, OpenAI, and Tinygrad
The Compiler
Telegram Bot, OpenAI, and Tinygrad

Nov 26 2024 | 00:02:46

/

Show Notes

Welcome to The Compiler, a daily curation of tech news

TOOLS YOU'LL ACTUALLY USE

python-telegram-bot
Comprehensive Python wrapper for the Telegram Bot API
pip install python-telegram-bot
Stars: 23.4k, Last commit: 1 day ago

nexa-sdk
Toolkit for GGML and ONNX models supporting text/image generation, VLM, ASR, and TTS
pip install nexa-sdk
Stars: 62, Last commit: 2 days ago

openai-python
Official Python library for the OpenAI API
pip install openai
Stars: 14.7k, Last commit: 4 days ago

REPO OF THE WEEK

tinygrad
Lightweight deep learning framework in pure Python
Key feature: Implements autograd and neural networks from scratch
Recent changes: Added support for Apple Silicon, improved CUDA backend


# Simple neural network in tinygrad
from tinygrad.tensor import Tensor
import tinygrad.nn.optim as optim

class TinyNet:
  def __init__(self):
    self.l1 = Tensor.uniform(784, 128)
    self.l2 = Tensor.uniform(128, 10)

  def forward(self, x):
    return x.dot(self.l1).relu().dot(self.l2).logsoftmax()

model = TinyNet()
optim = optim.SGD([model.l1, model.l2], lr=0.001)

# Training loop
for _ in range(1000):
  out = model.forward(x_train)
  loss = out.mul(y_train).mean()
  optim.zero_grad()
  loss.backward()
  optim.step()

Thanks for reading!

Andrew Pierno

Other Episodes

Episode

November 16, 2024 00:03:44
Episode Cover

GitHub Security, Apple Chips, Microsoft Cybersecurity ️

Welcome to The Compiler, a daily curation of tech news for engineering leaders. GitHub Security Alert: Malicious Commits Framing Researcher A recent incident involving...

Listen

Episode

November 16, 2024 00:03:33
Episode Cover

AI Chips, Bluesky Privacy & Google Docs AI

The Compiler is a daily curation of tech news for engineering leaders.

Listen

Episode

December 03, 2024 00:03:07
Episode Cover

Intel GPUs, OpenWrt Router & World Labs AI

Welcome to The Compiler, a daily curation of tech news QUOTE OF THE DAY "The most disastrous thing that you can ever learn is...

Listen