DEV Community

Laurent Laborde
Laurent Laborde

Posted on

Lesson learned building AI

This will be a short post.

I toyed with plenty of AI and types of AI. LLM, Reinforcement Learning, Alphazero, from scratch or using large framework, etc

There are a few major key points :

  • If an AI can cheat, it will. It's a well known behavior since the infancy of AI. It will maximize reward by any means.
  • If there is a bug to exploit, it will find it.
  • Garbage-in, Garbage-out, is greatly underestimated. The quality of an AI is all about the quality of data. Not only for LLM but also for RL.

I'm a DBA, my job is data. But even then, when it comes to AI it's not a fun job: Data quality is difficult to evaluate and this evaluation is time consuming.

Sanity checklist

If you're planning to work on AI, here are some things to remember:

  • You'll never have enough compute power (yes, i repeat it again).
  • You'll never have enough memory.
  • Make everything resumable. Do not wait the end of a 12h long processing to save outgoing results. Save them asap. (learned the hard way and still manage to forget from time to time)
  • Save everything, do not be cheap on disk space.
  • The more compute & memory you have, the more you'll use it. Scaling just works.
  • If you're doing inference and you can send concurrent queries, use vLLM. We're talking about 100tok/s vs 5000tok/s here. It's massive. Don't hesitate to push 64, 128 concurrent queries. It scales until you run out of VRAM.
  • I've tested all kinds of platforms. Apple Silicon is amazing and it works. But nothing can beat nVidia yet. The main advantage of Apple Silicon is its competitive price. (I never thought i would ever say that but here we are...)

AI Research

Amateur AI research is a bit like Amateur Astronomy. There are plenty of amateur research to be done, many unexplored spaces, ... But it's expensive to do and whatever result you get will have 0 visibility until someone finds out your work and make a thesis out of it.

And even then, a thesis can stay ignored for months, or years, until some dude in a hyperscaler company stumbles upon it and use it.

Just do whatever pleases you, or whatever you need. Everything else is white noise in an ocean of AI Slop. But i get it, it sure is frustrating when you wake up one morning and find thousands of youtube influencers and AI generated article talking about some "revolution" that you already knew about a year ago.

Top comments (0)