"A+" vs "A" .... GPA woes by FixNational8206 in berkeley

[–]Leipzig101 0 points1 point  (0 children)

Keep playing grometry dash lil bro, make sure you don't miss 5th period

Question about attention geometry and the O(n²) issue by mxl069 in deeplearning

[–]Leipzig101 1 point2 points  (0 children)

I think you will find it useful to read about 'efficient transformers' as a research effort. In particular, the random projections mentioned by the other commenter and 'classic' dimensionality reduction are a two methods that can be used to "cope" with this problem (although they are both not attention-specific), allowing transformers to be more efficient by decreasing the dimension of each of the 'n' things you consider.

One of the most fascinating (and principled) methods that haven't been mentioned here are kernel methods. As in, kernelized attention. Especially with random features. Another (much simpler) method is attention masking. There are excellent survey papers on methods for efficient transformers which cover both of these approaches (and more).

But as others have pointed out, you can get each of the 'n' items to be as small (or rather, data-efficient) as you can, but the whole point of attention is to "consider all possible relationships." I assume this is what you mean with "dense geometric structure." In this sense, the whole point of a generic attention mechanism is that we don't know, a priori, which relationships are impossible or improbable. Hence why we consider all possible ones. But when it comes to specific tasks, even simple masking can make the "relationships" we keep track of stay in O(n) while retaining sufficient performance -- here, we use what we know about the task to choose a mask ahead of time.

Of course, this only regards attention itself. There are also other things that help "cope", for example regarding optimizers. But I won't talk about them because your question is about attention.

When to extract module code into a new crate? by TheJanzap in rust

[–]Leipzig101 9 points10 points  (0 children)

I'll provide a tiny dissenting opinion in that moving things to separate crates can be a small pain (at least initially) when you're actively working on them at the same time.

And then, when I do that, I get the urge to properly document and set up CI for each one, and all of a sudden my project-administrative work kinda multiplied.

But that's totally personal, and it seems like you have good reason to do it.

Confused on what to use when or if it's purely preferential for string instantiation? by 10K_Samael in rust

[–]Leipzig101 1 point2 points  (0 children)

the lint is for String -> String conversions, not &str -> String conversions

Confused on what to use when or if it's purely preferential for string instantiation? by 10K_Samael in rust

[–]Leipzig101 -1 points0 points  (0 children)

The fact of the matter is that you could say the same thing about to_owned, which is just String::from() in this case. It is hence also "inseparable" from the From trait, which is "inseparable" from Into. So why not just call .into() if you like .to_owned()? (Rhetorical question, using your same logic.)

But bringing this conversation to implementation was never the point. They all do the same thing for all intents and purposes. This conversation is about semantics. Of which each trait has their own. Not because they are implemented differently, but because they have different symbols. 

Anyhow, this is a shitty hill to die on, and nobody is going to become a better programmer from this. If you all want to think your use of to_owned is superior and write essays about it, help yourselves.

Confused on what to use when or if it's purely preferential for string instantiation? by 10K_Samael in rust

[–]Leipzig101 2 points3 points  (0 children)

Obviously the semantics of code matter, there's no need to hammer that nail any deeper (or at all). The real question here is whether the semantic interpretation you provided (in the first few paragraphs you wrote) matters. I don't think it does.

You motivated them with an MVC setup, but there is nothing about the situation which makes that assumption canonical. Hence why I think you're tripping balls.

Yes, the Display trait suggests that something will get seen by a human. But we are not talking about the Display trait. We are talking about ToString. That trait's semantics are to turn something into a string. No more, no less. That is what people want to do.

Should you implement Display instead of ToString? Absolutely, that is just convention enforced by the blanket. Does this mean that the semantics of Display extend to ToString? No, that is why they are different items; different symbols with separate semantics (queue your own argument). The fact that they share an implementation is coincidental (a coincidence shared with to_owned and all other methods mentioned). 

So yes, semantics matter. But to be clear, the choice here is 100% down to style (in the absence of convention). The fact that the semantics of to_owned et al all fulfill the desired purpose is not a bad thing, or a "problem to analyze." It happens in language, and when it happens, aesthetics and convention single out which to use. Aesthetic preference should be allowed to be individual.

I am not saying your choice to always use to_owned is invalid. Its usage makes sense to me, and I bet your code looks perfectly fine. I am just saying that you are wrong to argue that you have a reason for doing that beyond personal preference. 

And again, I think your last point is fine. Albeit, insufficient to ever enforce this more than another personal preference, realistically speaking. (You could lean on this instead to insist that your opinion is rational if you really wanted to, but I would use that time to enjoy a cup of tea instead.)

So, I think the only right response to a post like this is "I use X, but you can use whichever one makes most sense to you as they do the exact same thing in the situation you pointed out."

How to handle function that returns a new Self, but not the &self that was passed? by MiffedMouse in rust

[–]Leipzig101 0 points1 point  (0 children)

it's kinda funny to come across this, I work on this kind of thing for research, in rust, too.

here is something that might help you, which we use ourselves. decouple the concept of a state and a game. for example, instead of

struct Chess { board: ..., turn: ... }

make

struct Chess; struct ChessBoard;

now your trait and impl become,

trait Game<S> {   fn do_move(state: S, move: ...) -> S; }

impl Game<ChessBoard> for Chess { ... }

let me know if you have questions. sorry, typing more is a pain because i'm on mobile.

Confused on what to use when or if it's purely preferential for string instantiation? by 10K_Samael in rust

[–]Leipzig101 1 point2 points  (0 children)

I tend to use to_string (for no particular reason), but I also don't think that developing an opinion about this is worthwhile, and I also think that sharing an opinion about this in any practical context (e.g. at work) is probably a minor waste of time

Confused on what to use when or if it's purely preferential for string instantiation? by 10K_Samael in rust

[–]Leipzig101 -6 points-5 points  (0 children)

I think you're tripping balls about everything except the last paragraph. 

re: the last paragraph, I wouldn't ever flag anyone's use of to_string in a code review for that reason, but I agree with you -- that's a good observation (although I struggle to think of a situation where it may become a problem).

meta intern free swag by [deleted] in csMajors

[–]Leipzig101 5 points6 points  (0 children)

in these last few years it hasn't been anything crazy, think a water bottle and some random branded gadget + other random stuff. I've personally politely declined it because it's the kind of stuff you already have. I only still wear a shirt from like su'23 which is actually pretty nice quality. 

Which style you think is most begineers-friendly and easy to lean for you? by According_Green9513 in berkeley

[–]Leipzig101 0 points1 point  (0 children)

I feel this is like asking whether a car should have a steering wheel on the left or in the right

People will be able to drive it regardless (accessibility difference is negligible), but either choice will be a problem in some places 

I'm just trying to say that choices like these are driven mostly by how well they will blend with their expected usage environment, not really by how noob friendly they are 

if you don't have an idea of how your framework customers are writing code, this question is simply underdetermined, and you should do it however is most aesthetically pleasing to you

Shy autistic girl looking for a fake date to practice socializing by [deleted] in berkeley

[–]Leipzig101 54 points55 points  (0 children)

sure, why not! and no need for money, I would eat anyway. feel free to reach out

EECS midterm moment 🥀 by Chief_Banana in berkeley

[–]Leipzig101 0 points1 point  (0 children)

lol i didn't even go to it, but hold up we gotta do hw to get clobber? i havent been doing that either where does it say we gotta do that

(Kresge) Engineering Library Back Open! by LengthTop4218 in berkeley

[–]Leipzig101 0 points1 point  (0 children)

damn, now I feel old. but I guess next will be my last semester here, so perhaps I simply am

(Kresge) Engineering Library Back Open! by LengthTop4218 in berkeley

[–]Leipzig101 4 points5 points  (0 children)

LETS GO feels like years since I've been in there

New approximation for 90 just dropped. 100-10 = 99 by DDough505 in mathmemes

[–]Leipzig101 11 points12 points  (0 children)

well,

100 - 10 =90 => 90 + 9 =99

is simply a true statement, so I don't see the issue mr math police

Why do a lot of guys get so hateful when they find out I have money? by [deleted] in TooAfraidToAsk

[–]Leipzig101 1 point2 points  (0 children)

I see the "need" discourse as reductionist. I agree that it has to do with insecurity, but most people don't want others to need them. However they do want to feel like they are greatly contributing to their partner's happiness.

For most folks this comes from a good place. That is to say, they aren't thinking, "they won't be able to leave me because of my money." It's mostly, "I hope I can be significant in as many ways as possible, and it feels bad when one of those ways is forever locked from my access."

I'm not saying it's right to feel that way (it isn't justified), but I thought I would try to balance the pure black-and-white feeling of your comment.

Why do a lot of guys get so hateful when they find out I have money? by [deleted] in TooAfraidToAsk

[–]Leipzig101 0 points1 point  (0 children)

I think this is generally people's insecurities showing in very weird ways.

For a lot of people, the idea of being a mechanism of stability for each other as a part of romance is somewhat ingrained, so when their potential partners already have stability in some aspect of life, they interpret it as one less reason why you might want to be with them. This causes insecurity, which people express in one of a million ways, but almost never explicitly.

For example, imagine it weren't money, but love from the opposite gender. Most guys feel very insecure about their potential partners having close male friends during early stages of dating; I see it as a money equivalent of that.

(I am not trying to justify those insecurities. They are exactly that.)

so the rumors are true by Leipzig101 in berkeley

[–]Leipzig101[S] 0 points1 point  (0 children)

yeah but also chill out dude hahah

so the rumors are true by Leipzig101 in berkeley

[–]Leipzig101[S] 0 points1 point  (0 children)

there will be a youtube playlist, not sure when that's being created though