Better HN
topnewbestaskshowjobs
Log inSign up

f_devd

903 karma · joined Sep 12, 2022 (4y ago) · 316 submissions

Submissions

comment 2y ago · link · parent

As long as you can position yourself behind the phase-shifters and the frequency is high enough (usually > 10GHz) it should be fairly easy to do.

comment 2y ago · link · parent

UMAP: https://umap-learn.readthedocs.io/en/latest/

scikit-learn also has options: https://scikit-learn.org/stable/auto_examples/manifold/plot_...

comment 2y ago · link · parent

For a moment I was excited that they had done surveys entirely on RF backscattering and ML.

comment 2y ago · link · parent

It has been more formally studied in signSGD[0], and empirically it's comparable to Adam in terms of behavior.

[0]: https://arxiv.org/pdf/1802.04434

comment 2y ago · link · parent

That's just the state calculation which would be O(N) and O(1) respectively. The based paper is saying if you made Transformers recurrent you would have a state size of 2Nd -> O(N), while based has a state size of d*d' -> O(1).

Transformers do have O(N^2) time & memory complexity, and Based/RNN/SSM {O(N) time, O(1) mem}, with respect to sequence length if that's what you mean. The point is it doesn't really give an indication of quality.

We can choose our constant arbitrarily so the big-O you've stated only indicates memory/time-complexity not 'look-back' ability relevant to any task. If you input the entire sequence N times into an RNN, you also have perfect recall with O(N^2) but it's not exactly an efficient use of our resources.

Ideally our state memory is maximally utilized, this is the case for RNNs in the limit (although likely oversubscribed) but is not the case for transformers. The holy grail is to have an input-dependent state-size, however that is quite difficult.

comment 2y ago · link · parent

I was responding to

> a Transformer layer can look back see O(X^2) numbers, while an RNN can only see O(X) numbers

The thing is RNN can look back infinitely if you don't exceed the state capacity. For transformers the state it is defined semi-implicitly (you can change the hidden dims but you cannot extend the look back; ignoring transformer-xl et al.) defined by the amount of tokens, for an RNN it's defined explicitly by the state size.

The big-O here is irrelevant for the architectures since it's all in the configuration & implementation of the model; i.e. there is no relevant asymptote to compare.

As an aside this was what was shown in the based paper, the fact that you can have a continuity of state (as with RNN) while have the same associative recall capability as a transformer (the main downfall of recurrent methods at that point).

comment 2y ago · link · parent

Transformers actually have an quantifiable state size (see https://hazyresearch.stanford.edu/static/posts/2024-06-22-ac...) although it's anywhere between 200k and 2M floats (for 360M and 1.33B respectively iinm). So a sufficiently sized RNN could have the same state capacity as a transformer.

(this is from the Based paper: https://arxiv.org/pdf/2402.18668)

comment 2y ago · link · parent

Seems they did "introduce" it in 20A this year but implies no commercial use yet, that would be with 18A in 2025[0].

[0]: https://www.intel.com/content/www/us/en/newsroom/opinion/con...

comment 2y ago · link · parent

I don't think the rust team would claim writing idiomatic safe rust code is always zero-overhead. Indexing into an array adds bounds checks which takes non-zero time. So by default you trade-off safety for performance to some degree; but this can be bypassed if needed, that's why you have unsafe.

For completeness, it's 0.1x the size with 1.20x the runtime, so these are not just language differences

comment 2y ago · link · parent

If you read the article I linked they show that it's entirely based on 16x16 matrices (or "tiles") which is fairly standard across gpus.

comment 2y ago · link · parent

> How much is the flash attention algorithm tied to the hardware?

The original FA, almost none.

For the latest versions depends on your abstraction, ThunderKittens[0] provides about the same speed up over FA2 (1.3x-2x%) as the article but relatively universal across GPUs. For any new hardware there may be hardware specific features that make it edge out more performance; usually vendors will adopt any new features that seems to beat them, but you do get fragmented API/libraries (which is already true for CUDA).

[0]: https://hazyresearch.stanford.edu/blog/2024-05-12-tk

comment 2y ago · link · parent

Only for the reference implementation, flash attention is just based on optimization of the memory bandwidth between caches. The ThunderKittens[0] library has what is effectively flash attention v3, and they are working on supporting AMD arch.

[0]: https://hazyresearch.stanford.edu/blog/2024-05-12-tk

comment 2y ago · link · parent

It is possible, mainly depends on LLVM/clang support as rust ASM is very easy to do

104.

Deps.rs: Keep your dependencies up-to-date(deps.rs ↗)

2 points · by f_devd · 2y ago · discuss

comment 2y ago · link · parent

Not an expert, but I've always understood it as (LI5):

You may have heard the effect of light is like a wave, higher frequency wave-lengths have a shorter wavelength, which means it can 'reach' smaller features without impacting the rest of the surroundings. Photo-lithography is done through a mask, this effectively means you get a crisper image projected onto the wafer.

If you go too far into/past UV it becomes hard to deal with in terms of heat and optics from my understanding. Which is why we keep getting new $prefix-UV rather than something like X-rays (which are past UV).

comment 2y ago · link · parent

ISPs do give enough where I am the issue is usually when you are behind 2 firewalls past that or have VMs that you want to DHCP, things like that.

A real world example my ISP provides /56 at the router level but if you put a firewall behind it, that gets a /64 (cannot be changed). Now the firewall cannot further delegate prefixes since it's already used. Some firewalls allow RA pass-through but in my case this wasn't an option so I had to set up NAT66 (non-standard :/) just to get outbound ipv6 connectivity.

comment 2y ago · link · parent

My only gripe with IPv6 is that clients use an entire /64, I get it's useful for SLAAC, but I wish I could make clients receive a /68 or more with DHCPv6 so that the address space can be subdivided even when you are already behind a /64 prefix.

comment 2y ago · link · parent

(disclaimer: I've not looked at mamba specifically yet) but state spaces as used current are different from traditional RNNs in a very simple way: the state is linearly (often associatively) accumulated while in RNN the state is passed/accumulated as an input/output of a non-linear function.

109.

ReScript: Fast, Simple Typed JavaScript from the Future(rescript-lang.org ↗)

2 points · by f_devd · 2y ago · discuss

comment 2y ago · link · parent

Doesn't fix ranking unfortunately

comment 2y ago · link · parent

Having written some esp-hal rust, you can also just use crates which use embedded-hal (for the I2C part) and embedded-graphics (for the display driver part).

If they don't exist it's usually quite easy to port the C/C++ code to rust which implements those traits

comment 2y ago · link · parent

I mean, if they somehow ported google analytics (or some other brokered PII network) I think they technically would need consent and disclosure.

comment 2y ago · link · parent

That's what I've observed, I gave it a task for a PoC on something I've been thinking about for a while and it's answer while syntactically correct is entirely useless (in the literal sense) due to it ignoring parts of the task.

comment 2y ago · link · parent

Not for YouTube, but Netflix DRM possibly?

comment 2y ago · link · parent

This is one of the main features I miss in rust, build.rs kind of gets you there (if you really need it) but it's always jank codegen.

comment 2y ago · link · parent

JMAP exists

comment 2y ago · link · parent

I would expect the price to decrease over time given perovskite solar cells are currently not yet mass produced and still actively being researched.

comment 2y ago · link · parent

I recommend checking out XXHash[0], FNV is simple but not really optimized and relatively low quality (often still good enough). From the readme page:

Hash Name, Bandwidth, Small Velocity, Quality, Comment

XXH3 (SSE2), 31.5 GB/s, 133.1, 10,

FNV64, 1.2 GB/s, 62.7, 5, Poor avalanche properties

[0]: https://github.com/Cyan4973/xxHash

Also ETag is exactly the kind of thing non-cryptographic hashes are meant for, but if you can't convince them Blake3 is a very fast modern cryptographic hash function.

12345
11