778 karma · joined December 20, 2023
This appears to be a bad translation. Modern translation is "and there are those who choose to live like eunuchs for the sake of the kingdom of heaven". This is referring to celibacy. The issue is explained in more detail by Paul in 1 Corinthians 7 verse 8-9.
Has anyone run it on a laptop (unquantized)? Disk size of the 32B model appears to be 80GB. Update: I'm using a 40GB A100 GPU. Loading the model took 30GB vRAM. I asked a simple question "How many r in raspberry". After 5 minutes nothing got generated beyond the prompt. I'm not sure how the author ran this on a laptop.
Figure 1 in the paper can be seen implemented in the forward() method of the GPT class in model.py. Here are the rough steps:
1. Tokens are embedded using a nn.Embedding layer. 2. Tokens are positionally embedded using a nn.Embedding layer. 3. The two embedding values are added to make the input x. 4. A sequence of N number of transformer blocks are then executed. This is the grey box in the left of the Figure 1. This is where all the magic happens. Chiefly in the self attention calculation. You can see this in the forward() method of the CausalSelfAttention class. 5. A regular nn.Linear layer is executed. 6. Finally the output token probabilities are calculated using F.cross_entropy (shown as softmax in the figure).
I hope this helps a little. Please feel free to suggest improvements and additions.
In TrainingConfig set the device to "mps". The run training.
In sample.py modify parse_args() and add support for mps as a possible value for the --device argument.
> It uses generative AI to stretch the backgrounds of images to fit these required dimensions...
The NSA does have a program to intercept traffic [2]. But that's not what got hacked here.
I do blame CISA and NSA though for not protecting the system well enough.
[1] https://www.americanbar.org/content/dam/aba/publications/lit...
[1] https://d1qx31qr3h6wln.cloudfront.net/publications/FUGATTO.p...
Easiest way to run a local LLM these days is Ollama. You don't need PyTorch or even Python installed.
https://mobiarch.wordpress.com/2024/02/19/run-rag-locally-us...
Hugging Face can be confusing but in the end a very well designed framework.
https://mobiarch.wordpress.com/2024/03/02/start-using-mistra...
- Modern object initialization using {} and ().
- std::string_view
- std::map
- std::stack
- Emplace addition of objects to containers like vector and map.
- Smart pointers (std::unique_ptr, std::shared_ptr and their ilk).
- Ranges library.
- Concurrency support library (std::async, std::future, std::thread, locks and the whole deal).
I was looking for range-based for loop, std::array and std::span and happy to see that they are all there.
Because this book relates to HPC, I'd add a few things: Return Value Optimization, move semantics, and in the recursive function section a note about Tail Call Optimization.
As a beginner level material I can highly recommend it.