RSSAmplifier

Blog

KiloBytes by KB

Recent content on KiloBytes by KB

kshitijbanerjee.comRSS feed ↗20 posts

Latest posts

Non Violent Communication

Introduction Nonviolent Communication (NVC), developed by psychologist Marshall Rosenberg, is an approach to communication that prioritizes empathy, deep listening, and the recognition of universal human needs. In his book Nonviolent Communication: A Language of Life, Rosenberg presents a framework designed to help individuals navigate conflicts, express themselves authentically, and foster…

Syncing historical data from IBKR

Syncing Historical Data from IBKR: A Comprehensive Guide In this post, we’ll walk through a complete workflow for downloading historical data from Interactive Brokers (IBKR) and preparing it for analysis and backtesting. Why download from broker ? The core assumption is that we sync data directly from the broker, ensuring its accuracy while trading and backtesting. Once this data is…

Statistical learnings from a failed 2024 santa rally

Intro Santa Claus Rally is a well-known narrative in the stock market, where it is claimed that investors often see positive returns during the final week of the year, from December 25th to January 2nd. But is it a real pattern or just a market myth ? It is also claimed that next years returns are positively correlated to the Santa rally. But is it a real pattern or just a market myth ?

Adventures in ML trading - Part 2

Preface In my previous post, I developed a simple mean-reversion strategy based on an oscillating signal calculated from a stock’s distance to its 50-day simple moving average. However, the results revealed a key shortcoming: the algorithm struggled to account for momentum, leading to poorly timed exits during parabolic moves—either too early or too late. In this post, we’ll dive into…

Adventures in ML trading - Part 1

Part 1/3 - Exporing the mathematical, statistical, and probabilistic nature of the market. Specifically, I attempt building a mean-reversion probability model, backtesting it against historical data, and understanding where/why it falls short. The results explain why simple statistical models fail to capture the complex beast that is the financial market. Nevertheless, this helps with foundational…

June 2024 - Papers on Agents, Fine-tuning and reasoning

What’s included Multi-Agent RL for Adaptive UIs Is ‘Programming by Example’ (PBE) solved by LLM’s Learning Iterative Reasoning through Energy Diffusion LORA: Low-Rank Adaptation of LLMs Automating the Enterprise with Foundational Models MARLUI - Multi-Agent RL for Adaptive UI ACM Link: https://dl.acm.org/doi/10.1145/3661147 Paper: MARLUI Adaptive UIs Adaptive UIs - as…

Evaluating LLM Benchmarks for React

Introduction I previously wrote about writing react code with Deepseek-coder 33b model, and whether we could improve some of these shortcomings with the latest research in the LLM space But to really measure and mark progress, it would require the build of a benchmark to test various hypothesis around it. So in this post, I’m going to evaluate existing benchmarks that specifically measures…

Can LLM's produce better code?

Introduction In my previous post, I tested a coding LLM on its ability to write React code. Specifically, I tried the currently leading open source model in the HumanEval+ benchmark leaderboard - DeepseekCoder:33b-instruct. I used this model in development for a few weeks, and published a subset of examples in the post. Even though I tried this on a relatively small problem size, there were some…

Deepseek coder - Can it code in React?

Introduction The goal of this post is to deep-dive into LLMs that are specialized in code generation tasks and see if we can use them to write code. Note: Unlike copilot, we’ll focus on locally running LLM’s. This should be appealing to any developers working in enterprises that have data privacy and sharing concerns, but still want to improve their developer productivity with locally…

Exploring Code LLMs - Instruction fine-tuning, models and quantization

Part 1/3 - Evaluating LLM’s that are specialised in code generation tasks , and evaluating their performance on writing code. This post starts with concepts and theory, while the next 2 parts evaluate specific code models.

Build - Tony Fadell

Introduction Tony Fadell is CEO of nest (bought by google ), and instrumental in building products at Apple like the iPod and the iPhone. The book is not about facts and science, but based on tony’s experience and deals with subjective concepts like how to build products, dealing with assholes, and how to hire etc. Overall, 4/5 stars for me, and I recommend reading it. It covers one strong…

Getting Things Done with LogSeq

Introduction I was first introduced to the concept of “second-brain” from Tobi Lutke, the founder of Shopify. The topic started because someone asked whether he still codes - now that he is a founder of such a large company. Tobi went on to explain that he spent the weekend writing some code to customise Logseq to his preferences, and that he’s an active member of the Logseq…

Understanding GPT 1, 2 and 3

Introduction The goal of this series of posts, is to form foundational knowledge that helps us understanding modern state-of-the-art LLM models, and gain a comprehensive understanding of GPT via reading the seminal papers themselves. In my previous post, I covered transformers via the original paper “Attention is all you need” that brought the innovation that made all this progress…

Understanding GPT - Transformers

Part 2/3 - Understanding how modern LLMS work. From RNNs, to transformers, towards modern scaling laws.

Understanding GPT - A Journey from RNNs to Attention

Introduction ChatGPT has took the world by storm, and has possibly started the 6th wave. Given its importance, the rush to build new products and research on top is understandable. But, I’ve always liked to ground myself with foundational knowledge on how things work, before exploring anything additive. To gain such foundational knowledge, I believe understanding the progression of…

Loss Functions in ML

Introduction Loss functions tell the algorithm how far we are from actual truth, and their gradients/derivates help understand how to reduce the overall loss (by changing the parameters being trained on) All losses in keras defined here But why is the loss function expressed as a negative loss? Plot: As probabilities only lie between [0-1], the plot is only relevant between X from 0-1 This means,…

Python Cheet Sheet

A quick cheatsheet on python operations Slice: astring = 'Hello World' print(astring[3:7]) # prints-> lo w print(astring[0:10:2]) # skips one character, prints -> Hlowr print(astring[::-1]) # reverse a string using step -1 Case astring.upper() astring.lower() Slicing complete list performs a copy spam_copy = spam[:] Zip to loop furniture = ['table', 'chair', 'rack', 'shelf'] price = [100, 50, 80,…

Grit - Angela Duckworth

Book Summary - Grit by Angela Duckworth The post is a book summary of the main bullet points from the book “Grit” by “Angela Duckworth” Components of Grit Angela breaks down grit in the following components:- Interest: I love what I do Practice: I will do what it takes to improve and become world-class Purpose: What I do is important for everyone Hope: I will keep going…

Largest Area Under a Histogram (and related concepts/problems).

A problem with a clever solution, with some insights to its construction

Reverse Engineer data from raw database files.

How to recover data from raw .tokudb files! Corrupted you tokudb mysql instance ? This post can help you recover the data from just the tokudb files.