Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Modern Computer Architecture and Organization
  • Table Of Contents Toc
Modern Computer Architecture and Organization

Modern Computer Architecture and Organization - Third Edition

By : Jim Ledin
5 (1)
close
close
Modern Computer Architecture and Organization

Modern Computer Architecture and Organization

5 (1)
By: Jim Ledin

Overview of this book

Computer architecture now extends far beyond CPUs, forming the foundation of cloud platforms, AI systems, cybersecurity solutions, and emerging computing technologies. Modern Computer Architecture and Organization, Third Edition, provides a clear, end-to-end understanding of how today’s computer systems are built and why architectural decisions matter more than ever. You’ll begin with the fundamentals of digital logic, processor elements, memory systems, and the hardware–software interface, building a strong grounding that remains essential for every architect and systems engineer. Next, the book explores modern processor and memory architectures, performance-enhancing techniques, virtualization, and mainstream instruction sets, including x86, ARM, and an in-depth treatment of RISC-V. New and significantly expanded chapters extend this foundation into modern computing domains, including AI and large language model (LLM) computing platforms, GPUs, cloud-scale systems, confidential and security-focused architectures, blockchain and Bitcoin mining systems, self-driving vehicle architectures, and future directions such as quantum computing. This edition reflects today’s AI-driven, cloud-centric, security-aware computing landscape while remaining true to the classical principles that continue to underpin modern computer systems.
Table of Contents (28 chapters)
close
close
Lock Free Chapter
1
Part 1: Fundamentals of Computer Architecture
8
Part 2: Processor Architectures and Instruction Sets
15
Part 3: Computer System Architectures
23
Part 4: Appendices
27
Index

Chapter 15: Large Language Model Computing Architectures

Exercise 1

Download and install the nanoGPT model from https://github.com/karpathy/nanoGPT. This is an open source implementation of GPT-2. Install its dependency packages and run it with the prompt "Tell me about GPT-2."

Answer

Open a command prompt and change to your project directory, then clone the model repository with this command:

git clone https://github.com/karpathy/nanoGPT

Install the required dependencies with this command:

pip install torch numpy transformers datasets tiktoken wandb tqdm

Perform inference for the requested prompt with the following command:

python sample.py --init_from=gpt2 --start="Tell me about GPT-2." --num_samples=5 --max_new_tokens=100

Some notes regarding the inference command:

  • If you do not have a CUDA-capable GPU installed, you will need to modify the line in sample.py that contains device = 'cuda' and change it to device = 'cpu'.
  • It may take some time...
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Modern Computer Architecture and Organization
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist download Download options font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon