Dot product example on p 58 fig 3.8 #948
Replies: 3 comments 5 replies
|
Hi Sebastian (I assume it's you :) ), Thanks for your tips on the dot product in your book (I was reading ahead I have begun reading App A, and kind of got stuck on whether to do the "Shared GPU/Memory" = 0.3/15.9 GB w utilization = 1%. Is that enough info for you to suggest that I use the GPU version of PyTorch, Thanks, |
|
Hi Sebastian, What I am taking from all this is the 768 seems ot apply to the token embeddings used in the neural network part of the architecture, and the 50,257 seems to apply primarily when the input is first encoded from text to tokens then embeddings, and when the output is finally decoded from embeddings to tokens then text. Where the ambiguity comes in for me is I don't see any clear distinction where the 50,257 initial encoding switches to the 768 for neural net processing, and on the output side where the 768 dim vectors get transitioned back to the 50,257 vectors that are appended to the output string. I can see the 50,257 has value because it represents the probability that the next token will be one of the 50,257 words or subwords in the vocab: i.e. all the probs add up to 1 and the largest of these is a good candidate for the output token to add to the response. So, generally, my question is, for example, could someplace like p94, fig 4.4, be used to show a box where 768-dim tokens get transformed to 50,257 on output, and another box where the 50,257-dim tokens get transitioned to 768 for input to the neural net stack? Thanks, |

Uh oh!
There was an error while loading. Please reload this page.
I bought this book based on reviews and believe it is highly regarded.
I have an MS in Physics and know what a dot product is.
On p 58 fig 3.8 there are 3 dot products shown x1.x2, x2.x2, x3.x2.
I cannot get any of them to match the result.
For example x1.x2 should = .4x.5 + .1x.8 + .8x.6 = .20 + .08 + .48 = .76 = w21
but answer in fig 3.8 says w21=0.9, which does not equal 0.76.
I know this is a nit, but I am new to LLM's and trying to understand this stuff for the first time and if I can't understand how the dot products are calculated it puts me on a very unfirm foundation for continuing to read the material.
Thanks,
Rich
All reactions