Better HN
topnewbestaskshowjobs
Log inSign up

coder543

6,677 karma · joined Jul 18, 2012 (14y ago) · 1,965 submissions

My email is at gmail using my username.

Backend-focused full-stack engineer with 8+ years of experience, mostly focused on Go, Rust, and TypeScript, but open to other options.

Resume: https://drive.google.com/file/d/1VNC272B3n7ZEfppMHkm2wGgaINwYl4Av/view

Submissions

comment 2y ago · link · parent

"Mistral 7B" is "mistral-tiny", "Mixtral" is "mistral-small", and "mistral-medium" is something larger.

https://mistral.ai/news/la-plateforme/

comment 2y ago · link · parent

Mistral Medium is available via their API, but not available for download, for example, so I find that confusing if you’re claiming their CEO claimed the plan is to be open for all models.

comment 2y ago · link · parent

How many tokens/s? Which quantization? If you could test Q4KM and Q3KM, it would be interesting to hear how the M2 Max does!

comment 2y ago · link · parent

That is a very interesting discussion. Weird to me that the quantization code wasn’t required to be in the same PR. Ika is also already talking about a slightly higher 2.31bpw quantization, apparently.

comment 2y ago · link · parent

ollama has been by far the easiest way for me, either on Linux directly (as I do now) or WSL2.

comment 2y ago · link · parent

I have not personally gotten to test things that way

comment 2y ago · link · parent

Mixtral is a larger model, so maybe that makes it more tolerant of that level of quantization? I’ve been impressed with 3-bit Mixtral, but I haven’t done a ton of side by sides against 4-bit because I haven’t felt the need.

comment 2y ago · link · parent

The fallback does seem to work! Although the 4-bit 7B models only run at 1 token every several seconds.

I still wish Phi-2, Dolphin Phi-2, and TinyLlama-Chat-v1.0 were available, but I understand you have plans to make it easier to download any model in the future.

comment 2y ago · link · parent

You can also choose to run at 4-bit quantization, offloading ~27 out of 33 layers to the GPU, and that runs at about 25 tokens/s for me. I think that's about the same speed as you get out of an M1 Max running at 4 bits? Although I'm not sure about the newer M2 or M3 Max chips. Googling around, I didn't immediately see clear benchmarks for those.

comment 2y ago · link · parent

Mixtral works great at 3-bit quantization. It fits onto a single RTX 3090 and runs at about 50 tokens/s. The output quality is not "ruined" at all.

For the amount of money you're talking about, you could also buy two 3090s (~$750 each on eBay) and have 48GB of VRAM to run with less quantization at full speed.

M-series Macs are surprisingly flexible platforms, but they're not "the only" consumer platform that can do Mixtral.

comment 2y ago · link · parent

CogVLM is very good in my (brief) testing: https://github.com/THUDM/CogVLM

The model weights seem to be under a non-commercial license, not true open source, but it is "open access" as you requested.

It would be nice if someone trained a CogVLM-compatible model from scratch under an open source license.

comment 2y ago · link · parent

I just need a WiFi 7 Access Point. I don't need the rest of Ubiquiti's stack. Fortunately, Ubiquiti supports (basic) standalone operation for access points: https://help.ui.com/hc/en-us/articles/12594679474071-Standal...

No buggy software required.

I don't see any reason to believe this new access point won't support standalone, so I just ordered one to replace an older access point (an Amplifi Alien that was in Bridge Mode).

The access point should do nothing except convert between wired and wireless, which is all I ask. I have a separate, wired-only router.

comment 2y ago · link · parent

The chart you pointed out is very interesting, but it largely supports my point.

The blue line is easiest to read, so let’s look at how the tokens/sec scale for a single user session as the batch size increases. It starts out at about 100 tokens/s for 5 users = 20 tokens/s/user. At the next point, it is about 19t/s/u. Beyond this point, we start losing some ground, but even by the final data point, it is still over 11t/s/u.

The throughput is affected by less than 2x even with the most unreasonably large batch size. (Unreasonable, because the time to first token is unacceptable for an interactive chat, as you pointed out.)

But, with a batch size that is balanced appropriately, the throughput for a single user session is effectively unchanged whether the service is batching at N=3 or N=10. (Or presumably N=1, but the chart doesn’t include that.) The time to first token is also a reasonable 1 second delay, which is similar to what OpenAI is providing in your testing.

So, with the right batching balance, batching increases the total throughput of the server, but does not affect the throughput or latency for any individual session very much. It does have some impact, of course. Model size and quantization seem to have a much larger impact than batching, from an end user standpoint.

comment 2y ago · link · parent

> I wonder are you using a quantized version of Mistral?

Yes, we’re comparing phone performance versus datacenter GPUs. That is the discussion point I was responding to originally. That person appeared to be asking when phones are going to be faster than datacenters at running these models. Phones are not running un-quantized 7B models. I was using the 4-bit quantized models, which are close to what phones would be able to run, and a very good balance of accuracy vs speed.

> Anyway, while these datacenter servers can deliver these speeds for a single session, they don’t do that because large batches result in much higher combined throughput.

I don’t agree… batching will increase latency slightly, but it shouldn’t affect throughput for a single session much if it is done correctly. I admit it probably will have some effect, of course. The point of batching is to make use of the unused compute resources, balancing compute vs memory bandwidth better. You should still be running through the layers as fast as memory bandwidth allows, not stalling on compute by making the batch size too large. Right?

We don’t see these speeds because datacenter GPUs are running much larger models, as I have said repeatedly. Even GPT-3.5 Turbo is huge by comparison, since it is believed to be 20B parameters. It would run at about a third of the speed of Mistral. But, GPT-4 is where things get really useful, and no one knows (publicly) just how huge that is. It is definitely a lot slower than GPT-3.5, which in turn is a lot slower than Mistral.

comment 2y ago · link · parent

> These data center targeted GPUs can only output that many tokens per second for large batches.

No… my RTX 3090 can output 130 tokens per second with Mistral on batch size 1. A more powerful GPU (with faster memory) should easily be able to crack 200 tokens per second at batch size 1 with Mistral.

At larger batch sizes, the token rate would be enormous.

Microsoft’s high performing Phi-2 model breaks 200 tokens per second on batch size 1 on my RTX 3090. TinyLlama-1.1B is 350 tokens per second, though its usefulness may be questionable.

We’re just used to datacenter GPUs being used for much larger models, which are much slower, and cannot fit on today’s phones.

comment 2y ago · link · parent

4-bit StableLM and 2-bit 7B models do seem to be working more consistently.

comment 2y ago · link · parent

I just checked and MLC Chat is running the 3-bit quantized version of Mistral-7B. It works fine on the 14 Pro Max (6GB RAM) without crashing, and is able to stay resident in memory on the 15 Pro Max (8GB RAM) when switching with another not-too-heavy app. 2-bit quantization just feels like a step too far, but I’ll give it a try.

Regarding credit, I definitely don’t need any. Just happy to see someone working on a better LLM app!

comment 2y ago · link · parent

EDIT: Attempting to converse with any Q4_K_M 7B parameter model on a 15 Pro Max... the phone just melts down. It feels like it is producing about one token per minute. MLC-Chat can handle 7B parameter models just fine even on a 14 Pro Max, which has less RAM, so I think there is an issue here.

EDIT 2: Even using StableLM, I am experiencing a total crash of the app fairly consistently if I chat in one conversation, then start a new conversation and try to chat in that. On a related note, since chat history is saved... I don't think it's necessary to have a confirmation prompt if the user clicks the "new chat" shortcut in the top right of a chat.

-----

That does seem much nicer than MLC Chat. I really like the selection of models and saving of conversations.

It looks like you’re still using the old version of TinyLlama. The 1.0 release is out now: https://huggingface.co/TheBloke/TinyLlama-1.1B-Chat-v1.0-GGU...

Microsoft recently re-licensed Phi-2 to be MIT instead of non-commercial, so I would love to see that in the list of models. Similarly, there is a Dolphin-Phi fine tune.

The topic of discussion here is Mistral-7B v0.2, which is also missing from the model list, unfortunately. There are a few Mistral fine tunes in the list, but obviously not the same thing.

I also wish I could enable performance metrics to see how many tokens/sec the model was running at after each message, and to see how much RAM is being used.

On the whole, this app seems really nice!

comment 2y ago · link · parent

What does snappier even mean in this context? The latency from connecting to a server over most network connections isn’t really noticeable when talking about text generation. If the server with a beefy datacenter-class GPU were running the same Mistral you can run on your phone, it would be spitting out hundreds of tokens per second. Most responses would appear on your screen before you blink.

There is no expectation that phones will ever be comparable in performance for LLMs.

Mistral runs at a decent clip on phones, but we’re talking like 11 tokens per second, not hundreds of tokens per second.

Server-based models tend to be only slightly faster than Mistral on my phone because they’re usually running much larger, much more accurate/useful models. Models which currently can’t fit onto phones.

Running models locally is not motivated by performance, except if you’re in places without reliable internet.

comment 2y ago · link · parent

The linked page claims that LiteLlama scored a zero on the GSM8K benchmark, so let's just say math probably isn't its forte.

comment 2y ago · link · parent

For example, I asked Mixtral to generate 4 questions and short answers following a prompt format that I provided. Then I used that output as the prompt for LiteLlama along with a new question:

    Q: What is the capital city of France?
    A: The capital city of France is Paris, a global center for art, fashion, gastronomy, and culture. It is located in the north-central part of the country and has an estimated population of 12.4 million in its wider metropolitan area.

    Q: Who was the first person to walk on the moon?
    A: The first person to walk on the moon was Neil Armstrong, as part of the Apollo 11 mission on July 20, 1969. When he stepped onto the lunar surface, he famously said, "That's one small step for man, one giant leap for mankind."

    Q: What is the chemical symbol for gold?
    A: The chemical symbol for gold is Au, derived from its Latin name, aurum, which means 'shining dawn.' Gold is a transition metal that is bright, slightly reddish yellow, dense, malleable, and resistant to corrosion and tarnish.

    Q: What is the tallest mountain in the world?
    A: The tallest mountain in the world is Mount Everest, located on the border of Nepal and Tibet. It has a height of approximately 8,849 meters (29,032 feet) above sea level. The first recorded summit of Everest was achieved by Sir Edmund Hillary and Tenzing Norgay in 1953.

    Q: What is the LHC? What has it accomplished?
    A:
And this is the output I received from LiteLlama:

    The Large Hadron Collider (LHC) is a particle accelerator at CERN in Geneva, Switzerland. It is a super-high-energy proton-proton collider that is designed to collide protons with protons at the LHC.

    Q: [Omitted since I don't care. You would normally stop the model when it responds with a stop word like "Q:", which it did.]
Obviously that response is not going to blow anyone away, but it didn't get stuck in a loop. It knew that LHC stood for "Large Hadron Collider", and it also knew that CERN and Geneva were relevant.

comment 2y ago · link · parent

This model does not appear to be fine-tuned for chat. I observed the same looping behavior with virtually any direct prompt.

If I prime it with a pattern of Q and A with several examples of a good question and a good answer, then a final question with a blank answer, it provides a more cohesive and less repetitious answer. To me, this indicates it just needs fine-tuning with an instruction dataset to perform more "normally".

Obviously, a model this tiny is going to have very little inherent knowledge, and it's probably not going to be great at anything other than speed.

comment 2y ago · link · parent

Don’t forget that oxygen is useful for breathing too. Semi-important, I hear.

ChatGPT estimates that if we converted all of earth’s atmospheric oxygen into water (via burning with hydrogen), ocean levels would rise about 3.7 meters: https://chat.openai.com/share/c9c8ce51-6070-49b6-a092-86e4a4...

I don’t have time to check this math, so take it with a substantial grain of salt.

comment 2y ago · link · parent

Teachable Machine has existed for years: https://www.theverge.com/tldr/2017/10/9/16447006/google-teac...

Its last real update (AFAIK) was in 2019: https://www.theverge.com/2019/11/7/20953095/google-ai-traine...

Like a number of Google projects, this one lives on without any clear direction. It probably will get axed some day, but the technology in Teachable Machine today is so “old school” already that I don’t think it would be that hard for someone to recreate or improve upon.

comment 2y ago · link · parent

Being multimodal doesn’t seem to require much of a size penalty: https://github.com/dlyuangod/TinyGPT-V

Even so, Google treats the Gemini Pro Vision model as a separate model from Gemini Pro, so it could have separate parameters that are dedicated to vision (like CogVLM does), and that wouldn’t impact the size of the model as far as text-tasks are concerned.

comment 2y ago · link · parent

Not the person you replied to, but… Microsoft apparently revealed that GPT-3.5 Turbo is 20 billion parameters. Gemini Pro seems to perform only slightly better than GPT-3.5 Turbo according to some benchmarks, and worse in others. If Gemini Pro is significantly larger than 20 billion, that would be embarrassing for Google. If it is significantly smaller, that would be good for Google.

It seems reasonable to me to assume it’s somewhere in the neighborhood of 20 billion, but I agree it is worthwhile to recognize that we don’t actually know.

comment 2y ago · link · parent

>> If the federal government were interested in passing a law that required this, I'm sure the Library of Congress could run such a server, but no such law exists.

> Require by law all who desire copyright protection to register the work with a governmental agency and place a copy of the work in escrow at an archive as a condition.

You’re just repeating what I already wrote. By all means, call your representatives.

comment 2y ago · link · parent

Okay, then I set the date on my computer to year the 2124. Now the DRM is unlocked!

You can't build a "time lock" with just encryption primitives. Even if you could build a time lock with just encryption primitives, we don't know when the copyright will expire until the original author has died, since copyright term is life + 70 years.

Someone would have to run a server that specifically chooses to start serving the keys on that date, which is an absurd notion given how absurdly long copyright lasts these days.

If the federal government were interested in passing a law that required this, I'm sure the Library of Congress could run such a server, but no such law exists.

comment 2y ago · link · parent

I think "visitors/users can edit" (not just the site admin) is also an essential part of the definition.

https://en.wikipedia.org/wiki/Wiki

https://www.merriam-webster.com/dictionary/wiki

1
171819
66