Better HN
topnewbestaskshowjobs
Log inSign up

codedokode

9,867 karma · joined Aug 20, 2015 (11y ago) · 5,528 submissions

PHP developer from Russia.
Submissions

comment 3y ago · link · parent

I cannot do ELI5, but can do ELI14 for you.

Transformer is a building block (a part) of a language model. "Language model" is an algorithm that can predict words following given words. For example, you can give a text to a model and get a summary of this text, or an answer to the question in the text, or a translation of the text.

Language models are often made of two parts - encoder and decoder. The encoder reads input text (each word is encoded as a bunch of numbers, for example, as list of 512 floating-point numbers) and produces a "state" (also a large list of numbers) which is expected to encode the meaning of the text. Then the decoder reads the state and produces the output as words (to be exact, as probabilities for every possible word in the dictionary to be at a certain position in the output).

Before Transformers, people tended to use so called "recurrent neural networks" architecture. With this approach, the encoder processes the text word by word and updates the state after every word:

    state = some initial state
    for word in text:
        state = model(state, word)
model(...) here is a complicated mathematical function, often with millions of operations and parameters.

As I have written above, after reading the text, the state should encode the meaning of the text.

But it turned out that this approach doesn't scale well with long or complicated texts because the information from beginning of the text gets lost. The model tends to "forget" what it had read before. So a new architecture, "Transformers", was proposed. The difference is that now we give entire text (each word encoded as bunch of numbers) to the model:

    state = model(input text)
Now the model processes the text at once. But implementing this naively would result in a very large model with too many parameters that would require too much memory and computing time. So developers used a trick here - most of the time each input word is processed separately from others (as in recurrent model), but there are stages, called "attention" where the words are processed together (and those stages are relatively light), so it looks like this:

    # stage where all text is processed at once
    # using quick algorithm
    state1 = attention(input text)
    # stage where each part of state is processed independently
    # with lot of heavy calculations
    state2 = map(some function, state1)
    state3 = attention(state2)
    state4 = map(some function, state3)
    ...
To summarize, in Transformers the model processes the text at once, but we have to employ tricks and split processing into stages to make calculation feasible. Probably that is why some people believe the authors should receive a reward for their work.

I think this explanation is as far as one can get without learning ML.

comment 3y ago · link · parent

Why such controversial questions as net neutrality or DMCA are not submitted to a referendum? In this case there would be no way for companies to lobby a decision they want. Is it because referendums are too expensive or because government doesn't want to let people make decisions?

comment 3y ago · link · parent

x86 also uses 2-address instructions which means that you often need to use moves between registers (additional instructions), example: [1]. ARM uses 3-address instructions.

Also, x86 code is compact, but not as compact as in era of 8080 [2] - here addition and multiplication require 3 bytes each, 6 bytes total. To my surprise, ARM has an add-multiply instruction and it uses just 4 bytes (instead of 8) [3].

And RISC-V uses 6 bytes because of shortened instruction for addition [4]

Of course, this simple function cannot be a replacement for proper analysis, but it seems that x86 code is not significantly denser.

Also to my great disappoitment none of those CPUs has checked overflow for arithmetic operation.

[1] https://godbolt.org/z/jsoccE5jv

[2] https://godbolt.org/z/jTMs1MEzh

[3] https://godbolt.org/z/nGb8qKcxe

[4] https://godbolt.org/z/x9c115crY

comment 3y ago · link · parent

4-5 years would be harsh enough for a crime where nobody gets hurt.

comment 3y ago · link · parent

But in America people are overpunished. I often read titles like "he faces up to 100 years in a prison" when in reality it is just a poor Russian guy who didn't murder or hurt anyone, just collected credit card numbers and sold it to other guys. 100 years just for stealing a bit of money? That's draconian laws.

comment 3y ago · link · parent

This is not something new. History shows that when the government controls the media, it can control people's opinions and beliefs. The only difference is that now the control over TikTok users' minds is not in the hands of US Government and that's why they are unhappy.

comment 3y ago · link · parent

I don't like that in the code validation rules are applied to a "request" (and written in a controller) but not to a model. This means that if you want to create a model somewhere else, you cannot reuse validation code.

comment 3y ago · link · parent

> Macs cpus are impressive, but not for ml

On Mac GPU has access to all memory.

comment 3y ago · link · parent

I explained in this comment https://news.ycombinator.com/item?id=35868305

comment 3y ago · link · parent

Regarding syntax, I think there are too many weird character combinations (:., ==:, etc) like these:

    ex.head == :. && return union!(sym,[ex])
    start = ex.head==:(call) ? 2 : 1
    
Also I don't like |> combination because it is hard to type. Why not use just single pipe character.

comment 3y ago · link · parent

The title says "GPU vendor-agnostic". But in fact for AMD only professional (expensive) GPUs are supported (ROCm is officially unsupported on most consumer and integrated GPUs).

To be truly vendor-agnostic it needs to support OpenGL or Vulkan.

Also this is the first time I saw examples of Julia code and the syntax looks worse than C++.

comment 3y ago · link · parent

I meant things like Microsoft's signing keys embedded inside BIOS, Microsoft Pluton CPU, secure enclaves inside CPU (now deprecated though) and things made for Secure Boot and DRM.

comment 3y ago · link · parent

With physical access you can simply install a keylogger, GPS tracker, and maybe something worse (malicious PCI-Express or USB device for example).

comment 3y ago · link · parent

Having encryption, keys and software that I cannot control because game makers and copyright owners want more profit is ridiculous.

comment 3y ago · link · parent

Make every player pay a deposit which is confiscated when they get caught cheating. Make servers with different deposit levels, so that people who really care about cheating pay over $1000 for example.

Better than having keys which I cannot control on my computer. And I don't play games anyway.

comment 3y ago · link · parent

> As for games, lots of people play games and want good anticheat

Great, let's install a backdoor in every computer so that some people can play games and watch movies. No. Computer is a thing for computing numbers not a replacement for a TV.

comment 3y ago · link · parent

Isn't it good? Does leaked key mean that now owners of hardware will be able to read and modify the firmware, including IME, and check it for backdoors?

Such keys should be in the hands of users, not Intel.

comment 3y ago · link · parent

You can sell the servers and partially return the money.

comment 3y ago · link · parent

> I imagine that every new step/functionality in the browser evolution introduces new minutiae that can be used in fingerprinting.

No problem; just put such APIs behind a permission and they become unusable for fingerprinting.

comment 3y ago · link · parent

I don't understand this, does it mean that Intel has put a part of card's hardware into a CPU and uses some non-standard interface between the card and the CPU? If not, then why cannot any other processor process the data? It's just bunch of numbers after all.

comment 3y ago · link · parent

For 13" screen isn't that more than enough? I barely see pixel grid on 1080p display.

comment 3y ago · link · parent

Why does it work only with Intel? Isn't WiFi card just an ordinary PCI-Express device?

comment 3y ago · link · parent

Probably a card that supports AMD-specific backdoors in Platform Security Processor, AMD's equivalent of IME.

comment 3y ago · link · parent

> If you're upgrading your Framework Laptop to the new Mainboard, remember that you'll need ... a Ryzen-compatible RZ616 or similar WiFi card.

Why does WiFi card need to be "compatible" with CPU? Isn't it enough to be compatible with PCI-Express? Or are there backdoors that do not work with Intel-backdoor-compatible WiFi cards?

comment 3y ago · link · parent

Based on previous experience I assume there are no quotas and the webpage can hang your system. I had Google Street View hang a whole Linux system by using too much memory and Firefox did nothing to prevent this.

comment 3y ago · link · parent

I believe main use of WebGPU, as well as WebGL will be fingerprinting therefore they should be put behing a permission. It is ridiculous that browser developers do nothing to reduce API surface usable for fingerprinting and instead just extend it.

comment 3y ago · link · parent

Put WebGL, enumerating installed fonts, web audio, etc. behind a permission. In rare cases when they are really needed not for fingerprinting, the user will grant a permission and nothing gets broken.

comment 3y ago · link · parent

> You can't block fingerprinting completely without breaking a ton of useful features.

Many of those features are not so useful and their main use is fingerprinting, for example:

- WebGL is mostly used for fingerprinting

- enumerating installed fonts is mostly used for fingerprinting

They should be put behind a permission popup, so that only those sites that really need them (e.g. graphic editors, text editors) can use them. So nothing gets broken.

1
969798
185