News for hackers. Stuff that matters.
Re:Llama.cpp Now Supports Qwen2-VL (Vision Language Model) by simonw on Saturday December 14, 2024 @08:42PM (#42420840)
The Qwen family of models are REALLY impressive. I would encourage anyone who hasn't paid them any attention to at least add them to your mental list of LLMs worth knowing about.

Qwen2-VL is a decent vision model. You can try it out online here: https://huggingface.co/spaces/GanymedeNil/Qwen2-VL-7B - I got great results from it for OCR against handwritten text: https://simonwillison.net/2024/Sep/4/qwen2-vl/

Qwen2.5-Coder-32B is an excellent (I'd say even GPT-4 class) model at generating code which I can run on a 64GB M2 MacBook Pro: https://simonwillison.net/2024/Nov/12/qwen25-coder/

QwQ is the Qwen team's exploration of the o1-style of model that has built in chain-of-thought. It's absolutely fascinating, partly because if you ask it a question in English it will often think in Chinese before spitting out an answer in English. My notes on that one here: https://simonwillison.net/2024/Nov/27/qwq/

Most of the Qwen models are Apache 2 licensed, which makes them more open than many of the other open weights models (Llama etc).

(Unsurprisingly they all get quite stubborn if you ask them about topics like Tiananmen Square)

Re:Llama.cpp Now Supports Qwen2-VL (Vision Language Model) by nothrowaways on Saturday December 14, 2024 @11:51PM (#42421545)
Just tested it with a meme, and it nailed it.
Re:Llama.cpp Now Supports Qwen2-VL (Vision Language Model) by sharih on Saturday December 14, 2024 @09:00PM (#42420915)
Agree. It is amazing that you can run an o1 style model on a Mac. I was able to run QwQ on my 24GB M3 MacBook Air, though results on complex reasoning on domain specific tasks did not work well, and I saw the Chinese 'thinking' too (they don't work well in o1 either). It opens up experimentation which is great, and the reasoning traces for domain specific tasks for RL is where the next improvements are going to come from
Re:Llama.cpp Now Supports Qwen2-VL (Vision Language Model) by mkl on Saturday December 14, 2024 @08:59PM (#42420908)
It's pretty good for handwritten maths too - I just tried that demo. Do you know any other open models good at maths notation?
Re:Llama.cpp Now Supports Qwen2-VL (Vision Language Model) by sadboi31 on Saturday December 14, 2024 @09:11PM (#42420958)
https://huggingface.co/datasets/TIGER-Lab/MathInstruct

Works with +700 year old books w some tweaks. took like $400 to train. can't share more because i don't know more.

Re:Llama.cpp Now Supports Qwen2-VL (Vision Language Model) by mkl on Saturday December 14, 2024 @11:21PM (#42421434)
That seems to be just for LLMs, not visual. I'm wanting to go from images of maths notation (photos, scans, digital handwriting) to formulas in Latex or MathML or something. Qwen2-VL can do it, but it's pretty heavyweight for just that.
Re:Llama.cpp Now Supports Qwen2-VL (Vision Language Model) by annon2003 on Sunday December 15, 2024 @12:37AM (#42421718)
so far I was pretty courageous in giving my language models full access to the console so they can perform terminal comments whenever necessary.

thinking that the Chinese government might have built in a back door gives me a little pause though

Re:Llama.cpp Now Supports Qwen2-VL (Vision Language Model) by lodovic on Sunday December 15, 2024 @03:17AM (#42422267)
There is no backdoor but the model is heavily censored and biased towards China. It refuses to discuss Chinese or North Korean politicians, Tiananmen square, Uyghurs or anything sensitive to China. It's quite positive about Putin - it doesn't mind trashing Western leaders, though. It may write clever code, and I understand that Chinese researchers have to abide by local laws, but it certainly has opinions that are incompatible with mine.
Re:Llama.cpp Now Supports Qwen2-VL (Vision Language Model) by exe34 on Sunday December 15, 2024 @04:04AM (#42422430)
given how Western models have their own biases, it occurs to me that we might be better off with a panel of models playing mock UN to cover everything.
Re:Llama.cpp Now Supports Qwen2-VL (Vision Language Model) by mkl on Sunday December 15, 2024 @01:03AM (#42421832)
How would a bunch of weights make a backdoor? The worst it could do is detect it's accessing an actual console and run a logged, visible command that tries to mess with your config or phone home, which is more of a front door with flashing lights saying "here I am!", so why would they bother?

Letting an LLM run arbitrary commands in your main user account seems risky even without worrying about conspiracies.

Re:Llama.cpp Now Supports Qwen2-VL (Vision Language Model) by teej on Sunday December 15, 2024 @03:21AM (#42422285)
It’s absolutely possible to put a backdoor into an LLM.

https://arxiv.org/abs/2408.12798

Re:Llama.cpp Now Supports Qwen2-VL (Vision Language Model) by jazzyjackson on Sunday December 15, 2024 @01:18AM (#42421874)
Just to wear my tin foil hat for fun, it's not that the model would attempt to phone home itself (what would it have to say, anyway?) but that given the opportunity it would go around kicking doors open for later infiltration by an outside party. Subtle bugs being introduced to your Django app, invisible characters that break your ssh configs, that sort of thing.
Re:Llama.cpp Now Supports Qwen2-VL (Vision Language Model) by mkl on Sunday December 15, 2024 @01:41AM (#42421953)
Yes, deliberately introducing vulnerabilities when generating code is a good one, and could be quite subtle. For running console commands though, anything touching configuration for ssh, gpg, bash aliases, ~/bin, cron, etc., should be immediately obvious.

I was thinking "here's an IP address and ssh key" would be what to phone home with, and that could be encrypted/hidden pretty well, but any network access should be pretty suspicious right away.

Re:Llama.cpp Now Supports Qwen2-VL (Vision Language Model) by ekianjo on Sunday December 15, 2024 @12:52AM (#42421771)
Why do you assume backdoors are limited to the Chinese government?
Re:Llama.cpp Now Supports Qwen2-VL (Vision Language Model) by okasaki on Sunday December 15, 2024 @06:01AM (#42422803)
We've always been at war with Eastasia.
Re:Llama.cpp Now Supports Qwen2-VL (Vision Language Model) by carom on Sunday December 15, 2024 @06:56AM (#42422970)
That would be an extremely expensive way to install malware.
Re:Llama.cpp Now Supports Qwen2-VL (Vision Language Model) by therein on Sunday December 15, 2024 @01:00AM (#42421814)
Are we at a point where we could run nonquantized models from QwQ/Qwen series on a 128GB Macbook Pro?
Re:Llama.cpp Now Supports Qwen2-VL (Vision Language Model) by simonw on Sunday December 15, 2024 @01:13AM (#42421857)
I think so. Are bf16 models nonquantized? There's an MLX one here that should fit on that machine: https://huggingface.co/mlx-community/QwQ-32B-Preview-bf16
Re:Llama.cpp Now Supports Qwen2-VL (Vision Language Model) by jl6 on Sunday December 15, 2024 @03:13AM (#42422258)
Why does this model think in Chinese and o1 think in English? Is this because chain-of-thought is achieved by training these models on examples of what “thinking” looks like, which have been constructed by their respective model developers, as opposed to being a more generic feature?
Re:Llama.cpp Now Supports Qwen2-VL (Vision Language Model) by MaxLeiter on Sunday December 15, 2024 @04:37AM (#42422535)
We don’t know o1 thinks in English. What we see is a summary of the thinking process.

My guess is it “thinks” in non-eligible tokens

Re:Llama.cpp Now Supports Qwen2-VL (Vision Language Model) by disqard on Sunday December 15, 2024 @05:34AM (#42422726)
Did you mean to write "non-legible" ?
Re:Llama.cpp Now Supports Qwen2-VL (Vision Language Model) by letmevoteplease on Sunday December 15, 2024 @09:47AM (#42423669)
The o1 release blog post contains 8 full examples of o1 chains of thought (not the summarized versions visible to users). They're English.

https://openai.com/index/learning-to-reason-with-llms/#chain...

I have seen the summaries dip into completely random languages like Thai, so it might switch between languages occasionally.

Re:Llama.cpp Now Supports Qwen2-VL (Vision Language Model) by teej on Sunday December 15, 2024 @03:18AM (#42422274)
> Unsurprisingly they all get quite stubborn if you ask them about topics like Tiananmen Square

Has anyone made a political censorship eval yet?

Re:Llama.cpp Now Supports Qwen2-VL (Vision Language Model) by echelon on Sunday December 15, 2024 @06:50AM (#42422951)
This would be a great one. Censorship / political alignment compass.
Re:Llama.cpp Now Supports Qwen2-VL (Vision Language Model) by cyanydeez on Sunday December 15, 2024 @11:50AM (#42424432)
Unfortunately, real political alignment doesnt exist. Most people dont use ideologies to determine alignment.
Re:Llama.cpp Now Supports Qwen2-VL (Vision Language Model) by echelon on Sunday December 15, 2024 @01:48PM (#42425146)
Alignment might be the wrong goal. Labeling and scoring, something like a multi-dimensional Ground News.
Re:Llama.cpp Now Supports Qwen2-VL (Vision Language Model) by zerop on Sunday December 15, 2024 @04:35AM (#42422528)
Is it possible to build similar to anthropic computer use feature with Qwen vision model.

Someone open sourced it with langchain

https://x.com/1littlecoder/status/1856397375704576399

Re:Llama.cpp Now Supports Qwen2-VL (Vision Language Model) by leobg on Sunday December 15, 2024 @04:10PM (#42426002)
Browser use is very easy. Can even do that headless. That way, you can also do bulk processing. For a client, I did some 16k websites with a simple LLM agent. With “computer use” how long would that take, and what would it cost? For me, it was ~$20 (I used Gemini for this task).
Re:Llama.cpp Now Supports Qwen2-VL (Vision Language Model) by Bancakes on Sunday December 15, 2024 @05:08AM (#42422627)
QwQ often spits out Chinese characters smack dab in the middle of a sentence. Weirdly, it doesn’t break up the coherence or logic, there’s just symbols added.
Re:Llama.cpp Now Supports Qwen2-VL (Vision Language Model) by nthingtohide on Sunday December 15, 2024 @05:28AM (#42422700)
Do you think training in multiple languages could act as a regularization? Just as polyglots are smarter in real life?
Re:Llama.cpp Now Supports Qwen2-VL (Vision Language Model) by Bancakes on Sunday December 15, 2024 @05:51AM (#42422761)
I haven’t seen the architecture of QwQ but I just assumed it learns languages insofar as to pick up relationships between words. It must mean it picks up logic across languages. Huh
Re:Llama.cpp Now Supports Qwen2-VL (Vision Language Model) by nthingtohide on Sunday December 15, 2024 @09:19AM (#42423507)
I thought too so. But then o1 thinks in english and Qwen thinks in chinese. Is there advantage in thinking in different languages?
Re:Llama.cpp Now Supports Qwen2-VL (Vision Language Model) by ksynwa on Sunday December 15, 2024 @05:56AM (#42422782)
> (Unsurprisingly they all get quite stubborn if you ask them about topics like Tiananmen Square)

I wonder how the abliterated variants respond to this query.

Re:Llama.cpp Now Supports Qwen2-VL (Vision Language Model) by Mkengine on Sunday December 15, 2024 @06:10AM (#42422828)
Do you have an opinion on Mini CPM 2.6 in comparison to Qwen2-VL?
Re:Llama.cpp Now Supports Qwen2-VL (Vision Language Model) by simonw on Sunday December 15, 2024 @11:19AM (#42424239)
I haven't tried that Mini CPM model yet.
Re:Llama.cpp Now Supports Qwen2-VL (Vision Language Model) by thisisit on Sunday December 15, 2024 @10:00AM (#42423752)
Recently I was scrolling through HF to try a very small model. Fired up Qwen 0.5 B and surprisingly for my purposes it did between that even Lllama 2 7B. That was very surprising to me.
Re:Llama.cpp Now Supports Qwen2-VL (Vision Language Model) by whitehexagon on Sunday December 15, 2024 @12:09PM (#42424531)
Thanks for the summary. I have been testing QwQ on my M1 (via ollama). I tried a couple double-slit quantum thought experiments, and also found the reasoning mode absolutely fascinating. Occasionally a few logographs appear, but they so far they were not in the way.

The funniest was asking for an ascii graphics depiction of a minecraft watch recipe, and I was actually feeling quite sorry for it, 'wait that can't be right' 'let me try' 'still not right' round and round it went, at least a few pages at which point it decided to try the second recipe I'd asked about to see if that helped with the first.

I didnt know about the other models, 'coder' is downloading now, and fingers crossed it fits in 32GB and knows a bit about Zig.

It sounds like you got the vision one running locally on your M2, nice. I'm running Asahi Linux and not tried anything AI/SD/graphical orientated yet. But nice that you got some SVG out of coder, I never thought of using a coding model in that way.

Re:Llama.cpp Now Supports Qwen2-VL (Vision Language Model) by maxglute on Sunday December 15, 2024 @03:32PM (#42425787)
> often think in Chinese

I noticed that too, but I haven't seen it think in numbers in Chinese like most bilingual chinese speakers prefers. Or at least I haven't been able to trigger it.

Re:Llama.cpp Now Supports Qwen2-VL (Vision Language Model) by nuclearsugar on Sunday December 15, 2024 @04:27PM (#42426097)
I recently fine-tuned the Qwen-Coder-7b-Instuct model to generate Milkdrop presets. Pretty amazing to see what can be done locally. https://huggingface.co/InferenceIllusionist/MilkDropLM-7b-v0...
Re:Llama.cpp Now Supports Qwen2-VL (Vision Language Model) by Abishek_Muthian on Sunday December 15, 2024 @10:46PM (#42427857)
Have you tried query extraction over tabular data? Is there any free models which are comparable to amazon textract for that?