Vivek Kalyan

Vivek Kalyan

@vivekkalyan.com

Applied AI. Building cartograph.app. Previously: Head of AI @ handshakes.ai 🇸🇬 I write (sparsely) at: vivekkalyan.com

74 followers169 following59 posts

Inspired by my experience consulting for companies and the rise of inference time compute for LLMs (as well as the acceptance of users waiting while the LLM *thinks*), I suggest many teams working on RAG should rethink if you can improve your accuracy by relaxing latency.

This is a super high impact project. There are tons of production models in the real world still running BERT/RoBERTa models from the 2018-2019 era, I'm sincerely hoping these models are easy to finetune, just the 8k context length will be good enough reason to upgrade.

Jeremy Howard @howard.fm

I'll get straight to the point. We trained 2 new models. Like BERT, but modern. ModernBERT. Not some hypey GenAI thing, but a proper workhorse model, for retrieval, classification, etc. Real practical stuff. It's much faster, more accurate, longer context, and more useful. 🧵

In complex systems, we spend most of our time understanding code - but most AI tools are focused on helping you write more code. Engineering teams struggle with outdated documentation and inconsistent system diagrams. This slows down development and makes it difficult to understand complex systems.

Cartograph solves this by automatically creating and updating both written documentation and visual representations that stay synchronized with code changes. We are very early, but there's much more to ship. We would love to get some feedback on our product.

Spent more than 2 hours yesterday night trying to figure out why my solution for day 6 part 2 was working on the examples but not on the test input. Slept on it, and figured it out in 5mins when I woke up today morning. 🤦‍♂️

Vivek Kalyan@vivekkalyan.com

Oh look, it's that time of the year. I will doing Advent of Code 2024 in Rust, hoping to get more experience using Rust to solve a wide range of problems. github.com/vivekkalyan/...

@eugeneyan.bsky.social's blog is a gold mine if you are doing ML/AI in the industry. Writing design docs before ML projects start is an important process that I introduced at my prev org, and the post on design docs was one of the references I used to create our template.

Eugene Yan@eugeneyan.com

Feels good to be mentioned on HN for engineers learning AI 🥰 Helping others is a big reason I write. Here's a list on ML/AI: ## Building AI systems • Patterns for Building LLM-based Systems: eugeneyan.com/writing/llm-... • What We’ve Learned From A Year of Building with LLMs: applied-llms.org

Methodology paper detailing how to train small, efficient off-topic classifiers using synthetic data from LLMs.

Gabriel Chua@gabrielchua.bsky.social

🚨 new applied ai paper from govtech LLMs are powerful, but they're prone to off-topic misuse, where users push them beyond their intended scope. Think harmful prompts, jailbreaks, and misuse. So how do we build better guardrails? arxiv.org/abs/2411.12946

The Gemini team really delivered with gemini-exp-1121. It slaps for writing tasks, it's outputs avoid the typical AI feel that other models (like ChatGPT) have, something previously only Claude achieved.

View full thread

This took me more time than expected, hope it's useful for other people! I really appreciate the open science work being done by allenai, and this was a fun weekend evening read.

View full thread

They also introduce more test datasets which use LLM-as-a-Judge - really seeming to be a common theme here. HREF uses human reference as a guide for LLM-as-a-Judge, allowing for a test set that can be used for open ended tasks such as summarization and rewriting.

And I really like this section: what didn't work. Both online DPO (training a reward model is hard) and rejection sampling (sampling n responses, choosing the best and using the rest as rejected) didn't improve performance.

View full thread

PPO - replaces the standard reward model with a verification function when the answer can be verified correct (e.g., in mathematics). The model is trained using PPO, only getting a reward if the answer is correct. This works really well to improve domains which have verifiable answers.

View full thread

DPO ablations - doing PPO is hard, primarily because of the reward model, which is hard to evaluate. They conclude that **for the budget** DPO works well enough for preference tuning.

DPO ablations - reducing memory requirements by caching log probs across the dataset instead of computing on the fly with a reference model and separating forward passes for chosen and rejected sequences.

View full thread

DPO ablations - on-policy data (generations from the base SFT model) improve model performance. Although, it's interesting to note that they don't seem to train the model for multiple rounds like Llama 3.1 (maybe cost concerns?)

DPO ablations - there is much focus on ensuring model follows instruction, mostly leveraging synthetic data methods to create {chosen, rejected} pairs. They also measure that you can take an existing dataset, regenerate it using their synthetic pipeline and it improves performance. Really cool.

View full thread

DPO ablations - the number of unique prompts in the preference dataset matter. More unique prompts result in better downstream performance, while more generations for the same prompts does not. Using different prompts from SFT data also improve performance.

View full thread

DPO - preference data is made of a on-policy model pool (Tulu 3 7B/70B) and off-policy model pool (other models). GPT-4o is used to rate generations from 4 random models from the model pool from 1-5. The highest is taken as the chosen response and the rejected response is sampled from the rest.

View full thread

SFT - a couple of data ablations: - Adding safety data didn't negatively affect other skills. - Measured the removal of math data on GSM8K and MATH, confirming that the scores drop. - Measured the the effectiveness of WildChat (diverse chat data) and Persona (skill based data)

SFT - using a better pretrained model (Qwen 2.5) results in better scores for GSM8K and MATH. Kinda surprising since the final model is still Llama 3.1, wonder if they evaluated Qwen 2.5 on other datasets as well and if the performance was not good enough to be the base model?

View full thread

Data decontamination - n-gram matching works better than embedding methods in terms of precision - 8-gram matching only on user-turns (since completions are LLM generated) - remove training sets that have more than 2% overlap with any evaluation set

SFT - for the data, train models on skill specific data mixtures, keep the mixtures that lead to the best performance on those skills. Later, combine the mixtures and do decontamination/downsampling of larger datasets.

View full thread

Data sources - they combat mode collapse using persona-driven synthetic data generation, where unique personas (e.g., "ML researcher focused on neural networks") guide LLMs to create diverse training data for specific skills like precise instruction following, math, and coding.

Core skills - they identify some key areas open post-training models struggle with and target those for improving, picking datasets in those areas for evaluation. Notably, they avoid looking at scores from the unseen set during development to assess if their choices might have led to overfitting.

You are up to date.