Video yükleniyor...

Video Yüklenemedi

Ana Sayfaya Dön

Replying to @yourgirl.kenzz #math MODULO ART ~ How to make modulo art ✨ Using mod 4 just means we’ll work with numbers 0, 1, 2, and 3. Here’s the step-by-step guide process adapted for mod 4: 1. Draw Your Grid Make a grid on paper, like 4x4. 2. Add...

326,100 görüntüleme • 2 yıl önce •via TikTok

0 Yorum

Yorum bulunmuyor

Orijinal gönderinin yorumları burada görünecek

Benzer Videolar

Self Attention by hand ✍️ ~ 9 steps walkthrough below Self-attention is what enables LLMs to understand context. How does it work? So I drew and calculated one entirely by hand. Goal: turn four 6D features into four 3D attention weighted features, filling in every cell yourself. = 1. Given = Four feature vectors, six dimensions each, one per position. = 2. Query, key, value = Let us multiply the features by WQ, WK and WV. Queries, keys and values all come out of the same four features, and that is what the word "self" is doing in self-attention. = 3. Prepare for MatMul = We copy the queries across the top and the transposed keys down the side. Lining the two up is half the work. = 4. MatMul = Let us multiply K transpose by Q. Every cell is the dot product of one key with one query, which we use as a matching score. That works because the dot product is the numerator of cosine similarity: it is how alike two vectors are, before anyone divides by their lengths. = 5. Scale = We divide by the square root of dk, the dimension of a key vector, here 3. Without it the scores grow with the dimension and a 64-wide head would swamp the softmax. To keep the page doable in pen, the drawing approximates dividing by root 3 with halving. = 6. e to the power = Let us raise e to the power of each score. This is the first half of softmax, and the drawing uses 3 in place of e, which is close enough to do in your head. = 7. Sum = We add up each column: 16, 6, 7 and 12. = 8. Normalize = Let us divide every cell by its column sum. That gives the attention weight matrix in yellow, and each of its four columns is now a probability distribution over the four positions. The decimals are nudged as they are rounded, so every column still sums to exactly 1. = 9. MatMul = We multiply the value vectors by those weights. Each output is a blend of all four values, mixed in the proportion the attention matrix just decided, and it goes to the position-wise feed forward network in the next layer: the FFN box at the bottom of the page. The outputs: Attention weights (A), by column = [.2, .6, 0, .2], [.2, .4, .2, .2], [.4, .2, 0, .4], [.1, .7, .1, .1] Attention weighted features (Z) = [8, 2, 6], [8, 4, 4], [16, 4, 2], [4, 2, 7] The takeaway: attention is a weighted average, and everything before step 9 exists to decide the weights. Compare every position with every other, turn the scores into one distribution per position, then blend. 💾 Save this post!

Tom Yeh

27,383 görüntüleme • 3 ay önce

Fibonacci numbers are the sequence where each one is the sum of the two before it: 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233… Every so often one of them is prime these are called Fibonacci primes, and only 21 are known. Here's the new discovery, take any Fibonacci prime (past the first few small ones) and reduce it to modulo 144. You'd expect the leftover remainder could be almost anything , 144 different possibilities. It never is. It only ever lands on one of just four numbers: 1, 5, 13, or 89. Mod 144... This just means finding the remainder after dividing by 144. Here's the three-step process, using the actual Fibonacci prime 1597 as an example. 1. Divide the number by 144. 1597÷144=11.09. 2. Keep only the whole number part, then multiply back by 144. 11×144=1584 3. Subtract to find what's left over. 1597 - 1584 = 13 So 1597 "reduced mod 144" is 13 one of exactly the four allowed numbers. Try it with any of the other 20 known Fibonacci primes and you'll always land on 1, 5, 13, or 89. Never anything else. That's a 97% reduction. Out of 144 possible remainders, 140 of them are simply forbidden to Fibonacci primes. We proved this happens every single time, for every Fibonacci prime known, with zero exceptions. It gets stranger. Those four allowed remainders 1, 5, 13, 89 are themselves smaller numbers from the same Fibonacci sequence. Every Fibonacci prime, when you shrink it down this way, lands back on another Fibonacci prime. The sequence points back at itself. And the positions that produce those four numbers the 1st, 5th, 7th, and 11th spots in the sequence turn out to be exactly the same four numbers that mark critical boundaries in a completely separate math system,(PLCT) one based on multiplying the numbers 2 and 3 instead of adding golden-ratio powers. Two totally different number systems, built from different operations, share the same four "checkpoint" numbers. The animation traces 233 different ways to build the number 144 purely out of powers of the golden ratio (phi ≈ 1.618, the number where a whole equals its bigger part divided by its smaller part). 233 is itself a Fibonacci number the sequence even shows up in how many ways you can build it. Every flash you see is one valid combination, spiraling and glowing as it cycles through all of them. The Golden Lattice ϕ-Power Representations, the General Count Law, and the Fibonacci Prime Mod-144 Signature Theorem

CTFTHEORY

12,946 görüntüleme • 4 ay önce

Replying to @jordynngramm takeout who?? General Tso’s Chicken 🫡 #generaltsoschicken #chinesetakeout 1 lb Chicken thigh or breast 1 tsp grated ginger 1 tsp grated garlic 1 egg 1 tsp Soy sauce 1 tsp neutral flavored oil 1 Tbsp cornstarch 3 Tbsp flour 1 tsp baking powder 1 tsp white pepper Nyeh salt Sauce: 3-4 dried chilis (if you can’t find these, sub with 1-2 tsp dried chili flakes) 1/2 cup Chicken Broth 4 Tbsp Soy Sauce 2 tsp Dark Soy Sauce 1 Tbsp Rice Vinegar 4 Tbsp ketchup 1 tsp grated ginger 1 tsp grated garlic 1 Tbsp brown sugar 1 tsp white pepper Optional 2 Tbsp Shaoxing wine Cornstarch slurry (1 Tbsp cornstarch + 2 Tbsp cold water) Optional 1 tsp sesame oil Cut your chicken into small pieces and add your egg, garlic, ginger, soy sauce and oil. Give it a mix before adding in your cornstarch, flour, and baking powder. The batter should lightly coat each piece, if not you can add more flour and cornstarch of the same ratio. Set that aside while you heat up your frying oil and mix together your ingredients for the sauce. Check the oil to see if it’s hot enough by sticking a wooden chopstick, spoon or skewer in. Once it bubbles, it’s ready. Add your chicken one piece at a time and in two separate batches to avoid overcrowding the pan. Fry each batch for 4 minutes and remove. Crank the heat to bring your oil back up to a higher temperature. Add all of your chicken back in for another 2 minutes or until it reaches your desired color. Either switch out your pan or carefully remove your oil. Add 1 tsp oil into your wok along with your dried chilis. Toast about 1 minute or until fragrant. Pour in your sauce and optional Shaoxing Wine and bring it to a boil. Add in your cornstarch slurry, reduce the heat and allow your sauce to thicken to a glaze. Add your chicken back in and sauté for another minute in the sauce along with 1 tsp sesame oil. Serve over rice, garnish with sesame seeds and green onion razzle dazzle and enjoy!

Cassie Yeung

4,700,000 görüntüleme • 3 yıl önce

ask me to make you an easy one pot dinner, and this cider braised chicken with caramelized onions & risotto is gonna be it! Ingredients ⁃ 2 lb. Chicken Thighs, skin on ⁃ 2 tbsp. Flour ⁃ 1/2 tsp. EACH: Salt, Flour, Paprika ⁃ 4 tbsp. Butter, divided ⁃ 1 large Yellow Onion, finely sliced ⁃ 8 oz. Mushrooms, sliced, about 2 cups ⁃ 2 tbsp. Fresh Sage & Thyme ⁃ 1 1/2 cups Uncooked Risotto ⁃ 4 cups Broth ⁃ 1 cup Apple Cider ⁃ 1/4 cup Heavy Cream ⁃ 1/2 cup Freshly Grated Parmesan Instructions 1. In a large skillet over medium high heat, add 2 tablespoons butter to melt. Add the finely sliced onions to sauté for 5-6 minutes. Add 1/4 cup water and stir until water is evaporated. Repeat until deeply browned, about 10-15 minutes. 2. Deglaze the pan with 1/2 cup apple ciders air until absorbed by the onions. 3. Add the sliced mushrooms and chopped herbs to sauté for 2-3 minutes. Remove from skillet to a plate. Set aside. 4. In a large bowl, combine the flour, salt, black pepper, and paprika. Mix well, then add the chicken thighs to toss in the mixture. Dust off any excess, then add to the skillet with the remaining 2 tablespoons butter. 5. Sear the chicken for 2-3 minutes on each side, adding more olive oil or butter if you find the skillet too dry. Remove the chicken to a plate. 6. Transfer the caramelized onions mixture back into the skillet, then add the risotto. Sauté for 2 minutes, then add the broth, apple cider, and heavy cream. Bring to a boil. 7. Stir in the grated parmesan, then add the chicken back in the skillet. 8. Reduce heat to simmer, covered with lid, for 15-20 minutes, until risotto is cooked. Enjoy warm! #fallrecipes #dinnerrecipes #onepotmeals #onepotdinner #chickendinner

Lauren 🧚🏻‍♀️

168,400 görüntüleme • 2 yıl önce