News for hackers. Stuff that matters.

Lapha

Re:Meta AI releases Code Llama 70B on Monday January 29, 2024 @08:11PM (#39185133)
Running models locally using GPU inference shouldn't be too bad as the biggest impact in terms of performance is ram/vram bandwidth rather than compute. Some rough power figures for a dual AMD GPU setup (24gb vram total) on a 5950x (base power usage of around 100w) using llama.cpp (i.e., a ChatGPT style interface, not Copilot):

46b Mixtral q4 (26.5 gb required) with around 75% in vram: 15 tokens/s - 300w at the wall, nvtop reporting GPU power usage of 70w/30w, 0.37kWh

46b Mixtral q2 (16.1 gb required) with 100% in vram: 30 tokens/s - 350w, nvtop 150w/50w, 0.21kWh.

Same test with 0% in vram: 7 tokens/s - 250w, 0.65kWh

7b Mistral q8 (7.2gb required) with 100% in vram: 45 tokens/s - 300w, nvtop 170w, 0.12kWh

The kWh figures are an estimate for generating 64k tokens (around 35 minutes at 30 tokens/s), it's not an ideal estimate as it only assumes generation and ignores the overhead of prompt processing or having longer contexts in general.

The power usage essentially mirrors token generation speed, which shouldn't be too surprising. The more of the model you can load into fast vram the faster tokens will generate and the less power you'll use for the same amount of tokens generated. Also note that I'm using mid and low tier AMD cards, with the mid tier card being used for the 7b test. If you have an Nvidia card with fast memory bandwidth (i.e., a 3090/4090), or an Apple ARM Ultra, you're going to see in the region of 60 tokens/s for the 7b model. With a mid range Nvidia card (any of the 4070s), or an Apple ARM Max, you can probably expect similar performance on 7b models (45 t/s or so). Apple ARM probably wins purely on total power usage, but you're also going to be paying an arm and a leg for a 64gb model which is the minimum you'd want to run medium/large sized models with reasonable quants (46b Mixtral at q6/8, or 70b at q6), but with the rate models are advancing you may be able to get away with 32gb (Mixtral at q4/6, 34b at q6, 70b at q3).

I'm not sure how many tokens a Copilot style interface is going to churn though but it's probably in the same ballpark. A reasonable figure for either interface at the high end is probably a kWh a day, and even in expensive regions like Europe it's probably no more than $15/mo. The actual cost comparison then becomes a little complicated, spending $1500 on 2 3090s for 48gb of fast vram isn't going to make sense for most people, similarly making do with whatever cards you can get your hands on so long as they have a reasonable amount of vram probably isn't going to pay off in the long run. It also depends on the size of the model you want to use and what amount of quantisation you're willing to put up with, current 34b models or Mixtral at reasonable quants (q4 at least) should be comparable to ChatGPT 3.5, future local models may end up getting better performance (either in terms of generation speed or how smart they are) but ChatGPT 5 may blow everything we have now out of the water. It seems far too early to make purchasing decisions based on what may happen, but most people should be able to run 7b/13b and maybe up to 34/46b models with what they have and not break the bank when it comes time to pay the power bill.

Re:Anki – Powerful, intelligent flash cards on Sunday January 28, 2024 @11:48AM (#39167427)
Well, he absolutely should have been using Vim, he instead spent the week learning vi.
Re:How many CPU cores can you use in parallel? on Tuesday December 19, 2023 @03:15PM (#38700879)
If it were just a standalone tool it wouldn't affect the licencing of the project, but it's not a tool, it's a software library, so projects using the library need to follow the terms of the GPL.

The tricky part here is that it's a library that produces graphs which themselves aren't covered by the terms of the GPL. The intent of the tool seems to be that you use it to produce graphs during development for benchmarking or during research or whatever where the tool is internal but the graphs aren't necessarily internal, in which case the licence of the library is mostly irrelevant as the GPL is mostly concerned with distributing software to other users of said software, not the output of the software, but if you later choose to want to release that tool it really aught to follow the terms of the GPL and be under a licence compatible with the GPL, so the note about it being a GPL licenced library is completely valid. You should use a more permissive LGPL/MIT/BSD/whatever licenced library like benchit if you don't want to have to think about this sort of stuff.

Note that the author of the unauthorised derivative work 'B', based on the 'original' work 'A', still retains copyright over their own (unauthorised) work B. Even if a court compels the author of B to stop distributing their infringing work B this fact doesn't change, B doesn't go out of copyright, and the author of A (or anybody else for that matter) doesn't have any additional rights to the use the work B.

In this particular case the Guardian article doesn't answer the question, but it's almost certainly the case that the courts found that Tolkien's estate didn't infringe upon Polychron's unauthorised work. In the UK (and much of the world), the bar for creating an original work is incredibly low, currently it's the EU approach where the author needs to express (creative) originality through choice, selection, or arrangement of a work. Previously the UK had the 'sweat of the brow' rule where the bar was even lower, only requiring 'labour, skill or judgement' in producing a work. The UK also explicitly protects derivative works from being considered infringement if they're found to be a parody, caricature, or pastiche, but this obviously isn't the case here.

Also note that 'copyright service' is a private company that sells copyright protection as a service through registering a work. The UK, unlike some countries, has no register of copyrighted works so you don't need to register a work for it to receive copyright protection in the UK.

>as open source really does only mean source available

The definition and history of the term as a licence is unambiguous in that the only restriction on redistribution is that it contains the source code under the same licence. There are senior engineers alive today that weren't even born when this was the commonly understood meaning of the term, it's not a new concept.

The term and usage is being co-opted these days but that's bound to happen when it's not a legally protected definition. Give it another 10-20 years and I'm sure we'll be having the same argument over whatever term ends up replacing 'open source'.

'Free' software has problems with its name too. The ones muddying the waters are people and companies releasing source code with a proprietary licence while trying to latch onto the open source branding.
Re:MP3 vs. AAC vs. FLAC vs. CD on Sunday October 01, 2023 @07:56PM (#37732267)
The topic of human vision and perception is complex enough that I very much doubt it's scientists who are making the claim that we can't perceive anything higher than 30-60fps. There's various other effects like fluidity of motion, the flicker fusion threshold, persistence of vision, and strobing effects (think phantom array/wagon wheel effects), etc, which all have different answers. For example, the flicker fusion threshold can be as high as 500hz[0], similarly strobing effects like dragging your mouse across the screen are still perceivable on 144hz+ and supposedly 480hz monitors.

As far as perceiving images goes, there's a study at [1] which shows people can reliably identify images shown on screen for 13ms (75hz, the refresh rate of the monitor they were using). That is, subjects were shown a sequence of 6-12 distinct images 13ms apart and were still able to reliably able to identify a particular image in that sequence. What's noteworthy is this study is commonly cited for the claims that humans can only perceive 30-60fps, despite the study addressing a completely separate issue to perception of framerates, and is a massive improvement over previous studies which show figures as high as 80-100ms, which seems like a believable figure if they were using a similar or worse methodology. I can easily see this and similar studies being the source of the claims that people can only process 10-13 images a second, or perceive 30-60 fps, if science 'journalists' are lazily plugging something like 1000/80 into a calculator without having read the study.

There's also the old claim [2] from at least 2001 that the USAF studied fighter pilots and found that they can identify planes shown on screen for 4.5ms, 1/220th of a second, 1/225th of a second, or various other figures, but I can't find the source for this and I'm sure it's more of an urban legend that circulated gaming forums in the early 2000s than anything. If it was an actual study I'm almost certain perception of vision played a role in this, something the study at [1] avoids entirely.

[0] 'Humans perceive flicker artifacts at 500 Hz' https://pubmed.ncbi.nlm.nih.gov/25644611/

[1] 'Detecting meaning in RSVP at 13 ms per picture' https://dspace.mit.edu/bitstream/handle/1721.1/107157/13414_...

[2] http://amo.net/nt/02-21-01fps.html

While I'm sure the publicly available and already moderated Reddit comments OpenAI pays workers to classify are truly disturbing, nobody should be forced to read Reddit after all, I think the moderators at Facebook, Google, porn websites, etc, that have to deal with moderating graphic videos of extreme violence, torture, gore, abuse, sexual abuse, child sexual abuse, etc, are the ones that have to look at the worst stuff on the planet.
>UK plug sockets are rated at 13 A, giving a maximum power rating of 2,990 W.

Nominally, anyway. When the EU standardised mains voltages they mostly did so on paper by fudging the tolerances, UK's 240v +/- 3% became 230v -6/+10%. 28 years later and I still see the mains voltage in the 240-250v range more often than not.

Re:Electricity Maps on Sunday August 20, 2023 @11:09AM (#37199896)
Ideally it's lifecycle carbon footprint averaged over expected power production during that time, but the numbers aren't always directly comparable and the error bars are huge to boot.

With solar, most of the carbon footprint comes from the massive energy requirements needed to produce the panels, and countries that use coal to produce panels like China have a significantly higher carbon footprint than say the EU. Then there's the matter of where you install them, panels in most of Europe will have a CO2/kWh figure similar to to panels installed in north-west Canada, while panels installed in the US will have a similar figure to panels installed in southern Europe and northern Africa. Newer panels generally have a longer lifespan and are more efficient so will have a lower number even if the total footprint stays the same. Should the albedo effect be considered with solar? It matters if you plan to cover a light desert with dark panels. How often it rains can also ironically have a difference, as rain helps clean the panels keeping them running efficiently.

With nuclear, there's the mostly fixed costs of constructing and decommissioning the plants, the ongoing cost of running and maintaining the plants, disposing of spent fuel, and with most of the cost coming from mining the fuel. To me nuclear seems a little more straight forward to calculate, but there's still variability that can come from the availability and difficulty of mining the ore. There's also political issues to consider. If your country decides to shut down your nuclear plants prematurely, like Germany did, the huge upfront cost of building the plants can't be recouped by running them for an additional 10, 20, 30+ years until it becomes necessary to decommission them.

Regardless of how renewables are compared to nuclear, coal and gas are the elephants in the room when it comes to CO2 produced per kWh.

I don't mean this as a dig, but I am curious to know what your use case is for launching new browser windows from different environments is. Something along the lines of remote debugging?
This change is likely only due to anticipation of a proposed EU law that would require 3+2 years of support, the Pixel 5a released in 2021 will only get 3 years of support, including security updates, and every single Pixel and Nexus phone that has been discontinued has had <= 3 years of support.

For comparison, all but the first 2 iPhones have received 4-5 years of support with the iPhone 6S being the oldest iPhone still receiving support almost 8 years later.

Android has been a complete joke when it comes to software support for older hardware, it's almost sad that it took proposed legislative pressure to change this.

Re:Glossary of Japanese words of Portuguese origin on Thursday July 20, 2023 @06:22AM (#36798692)
Japanese has a couple of words for 'door' (some of which refer to Japanese style sliding doors): 戸, 扉, 障子, but one of the more frequent ones is ドア which is a loan word from English 'door'. Adoption of loan words can be strange.
While it's not a direct parallel, I'd recommend people be careful with using your thumbs like this. I've been using a tiling window manager with the windows key as a modifier for years, but recently I've been having problems with strain in my thumb from switching workspaces 1-4 and toggling fullscreen/tiling (t and f keys). Had I used alt instead of the windows key it might have alleviated some of the problems as it's shifted to the right, but my hand position still ends up in the same position that gave me problems if I try to alt 4-6, e-t or d-g.

One remap I can fully recommend is remapping caps lock to control, it's an incredibly natural position to hit the very common ctrl-w,r,t,f,c,v hotkeys.

>it's going to take a while, and Rust has been here for 17 years.

Technically correct, but Rust was changing significantly from version to version prior to the 1.0 release some 8 years ago, notably the green thread runtime was removed.

>it replaces things like PulseAudio

More specifically, it's fully compatible with PulseAudio/JACK/ALSA and is capable of completely replacing them while still providing the benefits of what it's replacing. It's a complete joy to work with too, especially if you've ever experienced the nightmare that is getting your pro-audio JACK setup working nicely with pulse.

Re:Killing Community on Monday June 12, 2023 @04:53PM (#36300938)
There's definitely smart people on 4chan, but accessibility only exists insofar as there's enough of a culture to punch through the noise floor. Mentally filtering posts only gets you so far, if there's any sort of counterculture then discussion becomes impossible as people actively attempt to derail the thread, see any thread about Rust in the past couple of years for an example.

If you're lucky there won't be a counterculture, but the culture of the board won't always be conductive to discussion. I stopped browsing /g/ years ago but I remember a distinct decline in the quality of discussion around Linux and FOSS topics as the board shifted to more towards more general consumer technology, FOSS threads naturally became lower effort and more memetic* as a result to compete with the influx of new users who didn't care about this subculture. When Linus Torvalds announced that he would try to be more polite it gave some ammo to the anti-Linux culture and things deteriorated more. There was a particularly pertinent post around the attitude of NixOS users on /g/ that reflects this period pretty well I think.

* This sort of trend isn't unique to 4chan of course, the quality of discussion on hobby subreddits tends to decline when mods start allowing memes and low effort posts. Even if discussion continues it's never the primary focus and becomes harder to find.

* https://news.ycombinator.com/item?id=36274681

Both companies are juicing up the default power limits which absolutely matters if you're concerned about total Wh for sustained loads, thermal considerations, PSU rating, noise, etc, as you mentioned, but to be fair to AMD here they've released an eco mode on the 7000 series which does lower the default power limit quite substantially. You could do this before with manual adjustments to voltage and clock speeds, but now it's a simple toggle.

Another point is that in terms of power efficiency AMD are absolutely mopping the floor with Intel, where even older high power R9s are consistently outperforming Intel's lower power i5 and i7s by a wide margin. This sort of discussion is often left out of reviews which only look at TDP or peak wall power. It's still not ARM levels of efficiency, but x86 vs ARM or even desktop vs laptop efficiency is an entirely separate conversation.

Re:Our right to challenge junk patents is under threat on Monday June 05, 2023 @04:13PM (#36202888)
Not to detract from the point too much, but RSA was independently discovered in 1973.
Re:A peek inside Japan's largest “Dagashi” store on Tuesday May 30, 2023 @04:41PM (#36130462)
Smoking tobacco has clear negative health consequences today, but the association may not have been so strong when the predominant forms of heating households were open wood and coal fires. It's also worth keeping in mind that smoking tobacco wasn't always the predominant form of taking tobacco, chewing tobacco and nasal snuff are as old as tobacco itself to Europeans, and if Google's ngram viewer is anything to go by, cigars only overtook snuff in the late 19th century (bit of a dodgy data point, since snuff has multiple meanings).

Today some 500k-1m Swedes regularly take snus, and the association with oral and pancreatic cancers is tenuous at best, and the BMJ reported in the 1980s that there has been one case of nasal cancer linked to nasal snuff in the 300 years it has been used in the UK. Chewing tobacco is a little more harmful but not by much.

Cigarette companies have done a good job the past century of associating any harmful effect of smoking tobacco with tobacco and nicotine itself, despite cigarettes being 100x more harmful than either snus or snuff.

Re:VR optics and why IPD means too many things on Tuesday May 30, 2023 @01:19PM (#36127580)
The first mechanical clock that could accurately and reliably measure seconds was a pendulum clock with a length of one metre. Seconds and metres go hand in hand with the metric system.
Re:Ithkuil, the Most Complicated Language on Tuesday May 23, 2023 @07:01PM (#36051928)
Hopefully it stays at least a France away.
Re:EU's Cyber Resilience Act contains a poison pill on Friday May 12, 2023 @01:20PM (#35919127)
>Unless someone can point to an American (Japanese/Australian/Canadian/Korean/Mexican/Chinese/Indian etc etc) law passed promising equivalence this continued notion that the EU laws are global is really weird.

Extraterritorial jurisdiction isn't a new or unusual concept in the slightest, and I don't understand the recent trend of pretending that it's only the EU does this. The classic examples of money laundering, organised crime, sexual crimes committed against children, female genital mutilation, anti-competitive laws, etc, are so mainstream at this point that I don't think any Westerner would consider it controversial for somebody who does these acts in countries where they are less regulated to be arrested for them upon arriving in a Western country.

There's also more HN specific examples like cybercrime, with a recent example being the arrest of Marcus Hutchins. Or copyright, where anybody from countries with less strict copyright laws from the US knows what I'm talking about. Japan has strict copyright laws too, and game companies like Sega and Nintendo are notoriously protective of their IP to the point where Sega has apologised for abusing the DMCA to take down videos produced by North American and European nationals. COPPA predates the GDPR by 15 years and is applicable everywhere. The Canadian Anti-Spam Legislation regulates sending spam to Canadians. The German NetzDG will send you a strongly worded letter if you criticise Germans.

Many data protection laws also regulate how you handle data of their nationals. For example, the data protection laws India introduced in 2011, applicable to businesses that outsource operations to India, were described as much more restrictive than the EU or US counterparts. China regulates that foreign businesses doing business in China store all their data in China. South Korea has no scope on territory for their PIPA, but it's hard to tell if this applied to their 2011 legislation or just their 2020 legislation as these laws obviously aren't in English. Many newer laws are modelled after the GDPR and also have no scope on territory, e.g., Brazil, California, Russia, etc.

There's other more general examples too. Many countries criminalise taking drugs, and evidence that you've taken drugs in the past can lead to you being deported. Consumer protection laws are generally pretty strong and banks will side with consumers in issuing charge backs. Anecdotally, Steam had a no refund policy for the longest time and support staff would berate you for asking for a refund for a game that doesn't work, but they still issued refunds and now have a refund policy (even if it doesn't fully comply with local laws). America regulates exporting arms, which caused a lot of drama in the Linux scene in the early 2000s when encryption was (still is?) considered munition. Doing commerce with embargoed or sanctioned countries can land you in hot water too, it might make sense for 'bad guy' countries like China, Russia, Iran, etc, but the US and Israel stand alone in defending the embargo on Cuba. Many countries have restrictions on freedom of speech, it might not be the best idea to travel to Turkey if you publicly criticise Erdoğan. Etc.

--

None of this is to say that I agree with what the EU is doing, or that these examples are 1:1 parallels, but I think the attitude of 'these laws don't/shouldn't affect me' is naive at best, unless you plan on never leaving or doing business outside of your own country.