< Back to the archive

Like what you see? Subscribe here and get it every week in your inbox!

Issue #249 - December 17, 2023

Here are the top threads of the week, happy reading!

Top comment by midgetjones

A few years ago, my wife and I decided to adopt a rescue cat from battersea.org.uk. However, it was a frustrating experience as the staff didn't always update the website regularly, and we'd find that any suitable cats would be snapped up before we'd even seen them.

I spotted that the website served its data to the frontend via an unsecured internal JSON API, so I built an Elixir app that would poll the API endpoint and upsert the cat data into the database. Any new records would get posted to a twitter account (a free way to get notifications on my phone).

It worked beautifully, and when a black cat called "Fluff" popped up, we both knew he was the right one, and we were able to phone them and arrange a meeting before anyone else. Fast forward five years, and he's sitting next to me on the sofa right now, purring away.

Top comment by Apreche

A lot of people these days have just been thrown into the fire with Git as the first and only VCS they’ve ever seen.

I’m not that old, but I’m old enough to have used RCS, CVS, SVN, then finally Git. I started using Git super early, before GitHub existed. You may not believe me, but Git was the answer to all my prayers. All those previous systems had fundamental architectural flaws that made them a complete nightmare to use on a team for any serious work.

Git has no such problem. There’s nothing it can’t do. Instead, the only limitation is on the user being able to know how to get Git to do what they want it to do. Thankfully, that’s always solvable with a quick read of the documentation or web search.

I understand that people might want to make it easier, since the UI is complex, but that’s never going to work. If you abstract away the complexity of the UI, you will necessarily abstract away the power. If you abstract away the power, you are no longer solving all the problems that Git solved. People just don’t realize what problems are being solved because they never lived through those problems with the previous VCSes.

You know what’s easier than building a new VCS better than Git? You know what’s easier than using a different VCS from the rest of the world? You know what’s easier than designing a miraculous abstraction on top of Git?

Learning Git.

Whatever effort you are putting into seeking or building an alternative, instead put that effort towards becoming a Git expert. It will be a lot less effort with a lot more benefit. Trust me on this. It will be well worth it for your career and for your personal computing life as well.

Top comment by janalsncm

I got a masters degree in ML at a good school. I will say there’s pretty much nothing they taught me that I couldn’t have learned myself. That said, school focused my attention in ways I wouldn’t have alone, and provided pressure to keep going.

The single thing which I learned the most from was implementing a paper. Lectures and textbooks to me are just words. I understand them in the abstract but learning by doing gets you far deeper knowledge.

Others might suggest a more varied curriculum but to me nothing beats a one hour chunk of uninterrupted problem solving.

Here are a few suggested projects.

Train a baby neural network to learn a simple function like ax^2 + bx + c.

MNIST digits classifier. Basically the “hello world” of ML at this point.

Fine tune GPT2 on a specialized corpus like Shakespeare.

Train a Siamese neural network with triplet loss to measure visual similarity to find out which celeb you’re most similar to.

My $0.02: don’t waste your time writing your own neural net and backprop. It’s a biased opinion but this would be like implementing your own HashMap function. No company will ask you to do this. Instead, learn how to use profiling and debugging tools like tensorboard and the tf profiler.

Top comment by druskacik

Refactoring UI is a book you can read in a couple of hours, but it helped me immensely to design my projects. It does not go to a great depth, but it's very useful for simple and quick hacking.

https://www.refactoringui.com/

Top comment by rickreynoldssf

This really shouldn't be a shock for Netflix employees. According to Netflix's culture page (https://jobs.netflix.com/culture) They are a team, not a family.

When you're on a team you know you can be cut at any moment. It's ruthless over there and the recruiters will make sure you're aware of that early in the interview process. Netflix was never known as a good place to work which is why they pay outrageous salaries and the average employment length is a little over a year.

Top comment by hapanin

Since nobody is actually recommending papers, here's an incomplete reading list that I sent out to some masters students I work with so they can understand the current research (academic) my little team is doing:

Paper reference / main takeaways / link

instructGPT / main concepts of instruction tuning / https://proceedings.neurips.cc/paper_files/paper/2022/hash/b...

self-instruct / bootstrap off models own generations / https://arxiv.org/pdf/2212.10560.pdf

Alpaca / how alpaca was trained / https://crfm.stanford.edu/2023/03/13/alpaca.html

Llama 2 / probably the best chat model we can train on, focus on training method. / https://arxiv.org/abs/2307.09288

LongAlpaca / One of many ways to extend context, and a useful dataset / https://arxiv.org/abs/2309.12307

PPO / important training method / idk just watch a youtube video

Obviously these are specific to my work and are out of date by ~3-4 months but I think they do capture the spirit of "how do we train LLMs on a single GPU and no annotation team" and are frequently referenced simply by what I put in the "paper reference" column.

Top comment by chrismorgan

You can’t. They refuse to let you. The closest you can do is to dispute a copyright claim (as mentioned by another); but YouTube refuses to be a judge in that case, and even if you’ve provided good, provable information, the claimant can still just reject it and (as far as I can tell) instruct YouTube to make it a copyright strike of the three-strikes-and-you’re-out kind. Seriously. The system is designed to be abused.

And even if your claim is allowed (whether the claim is released, or it lapses in your favour after 30 days), the claimer can still keep on claiming the same thing, so if you or someone else uploads it again, it’ll be silently claimed and you’ll have to go through the rigmarole all over again. This makes no sense at all if it was actually about copyright law with equitable treatment of all, and shows a bit what I mean by “designed to be abused”.

I gave more info and stats from my experiences with melody claims of public domain hymns in 2020: https://news.ycombinator.com/item?id=27004892. So much casual fraud.

Top comment by MPSimmons

I think there are a couple of basic questions need answered before we can find a good solution:

1) What are you trying to do?

2) What's your budget?

Generically saying, "run inference" is like... you can do that on your current thinkpad, if you want a small enough model. If you want to run 7B or 13B or 34B models for document or sentiment analysis, or whatever, then you can move to the budget question.

When I was faced with this question, I bought the cheapest 4060 Ti with 16GB I could find. It does "okay". Here's an example run:

  Llama.generate: prefix-match hit
  
  llama_print_timings:        load time =     627.53 ms
  llama_print_timings:      sample time =     415.30 ms /   200 runs   (    2.08 ms per token,   481.58 tokens per second)
  llama_print_timings: prompt eval time =     162.12 ms /    62 tokens (    2.61 ms per token,   382.44 tokens per second)
  llama_print_timings:        eval time =    8587.32 ms /   199 runs   (   43.15 ms per token,    23.17 tokens per second)
  llama_print_timings:       total time =    9498.89 ms
  Output generated in 9.79 seconds (20.43 tokens/s, 200 tokens, context 63, seed 1836128893)

I'm using the text-generation-webui to provide the OpenAI API interface. It's pretty easy to hit:

  import os
  import openai
  url = "http://localhost:7860/v1"
  openai_api_key = os.environ.get("OPENAI_API_KEY")
  client = openai.OpenAI(base_url=url, api_key=openai_api_key)
  result = client.chat.completions.create(
      model="wizardlm_wizardcoder-python-13b-v1.0",
      messages = [
          {"role":"system", "content":"You are a helpful AI agent. You are honest and truthful"},
          {"role":"user", "content": "What is the best approach when writing recursive functions?"},
      ]
  print(result)

But again, it just depends on what you want to do.

Top comment by DemocracyFTW2

> is it worth it to pay $20 [...]?

I always object when someone tells me "it's (only) X $ / Y $" and I know for me the relevant part that I want to say out loud is per month, as in, it's a subscription, not a one-time or prepaid amount. I've rid myself of all subscriptions to the degree feasible because whether it's 'little' or 'much' it is recurring, per month so there will likely come a point in the future where I'll just pay without really using that thing anymore or where I forget or can't pay or where I have to pay although that sum could better be spent elsewhere. This is my experience with all subscriptions. I'm even getting my cooking gas as 'prepaid' (i.e. I buy bottles) and I wish I could do the same with electricity and so on.

So I'm totally fine with getting a gift card or whatever you call those thingies in the supermarket where you can throw a lump (20€, 50€) at some provider (Google Play, whatever) and then get to eat up that amount (over the course of at least one year, hopefully). By comparison, I wouldn't sign up even for 1€/month even tho I might get the same for 'less' money—it won't be less, and when you listen to Marie Myers (HP CFO, [1]), corporate knows darn well this is so.

* [1](https://www.theregister.com/2023/12/04/hp_printer_lockin/)

Top comment by Layvier

In software, "A Philosophy of Software Design" is a must read imo. Otherwise Rich Hickey's talks are always very insightful.