← Table of Contents · Page 806 of 868

APPENDIX G: LAB SETUP GUIDE

Part 3 of 7

CHOOSING HOW TO REACH A MODEL You have two choices, and the lab works with either one. Choice 1: a hosted model provider. Create an account with a provider, create an API key, and store it as an environment variable on your computer. Never type the key into a code file, and never put it in a file that you save to version control. Choice 2: a locally run open-weight model. Install a local inference server, which is a program that runs a downloaded model on your own computer, and point the lab's model adapter at that server's local address instead of at a hosted service. Local models need enough memory, and possibly a Graphics Processing Unit (GPU), so smaller models are the realistic choice on an ordinary laptop. Because the model adapter hides these differences, switching between the two choices should change only a few settings. Costs and privacy: a hosted provider usually charges per token, so set a small spending limit with the provider if it offers one, and remember that the lab data is fictional so nothing private is being sent.
Advertisement
Read Aloud:
0:00 / 0:00