liveBook · Manning

Llama

As explained in Starting Data Analytics with Generative AI and Python

A family of large language models developed by Meta for generative-AI applications.

Llama is a family of generative language models from Meta. It can serve business prompts through an OpenAI-compatible API or run locally when privacy, control, or cost matters. section 1.3.3 section 1.3.5

Choose an access pattern according to the practical constraint:

  • Use an API-compatible provider by changing the client’s base URL, authentication token, and model name; much of the surrounding Python code can remain unchanged. section 1.3.3
  • Run Llama 2 locally with a downloaded GGUF model, LangChain, and llama-cpp-python. section 1.3.5
  • Use quantization to reduce RAM and computation, accepting some loss of accuracy for easier execution. section 1.3.5

Directing an API client to Llama

A Python client can point at a Llama-compatible service by supplying its provider token and base URL, then selecting a valid variant such as llama-13b-chat. A local workflow instead installs LangChain and llama-cpp-python, loads a GGUF file, sends a prompt, and prints the response.

How Starting Data Analytics with Generative AI and Python covers it

How deep it goes
Explains API configuration and local execution steps, but defers detailed model internals and current library requirements.
Examples
Demonstrates hosted client configuration and local prompt invocation with a quantized GGUF model.
What it assumes
Assumes basic Python and command-line familiarity, while introducing local model files, quantization, and library setup.
What you can do after
Build it from scratch by configuring a hosted Llama endpoint or invoking a downloaded model locally with Python.
How it connects
Connects Llama with OpenAI-compatible APIs, quantization, GGUF, HuggingFace, LangChain, and llama-cpp-python.

Also explained in

Compare how 5 books explain Llama →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Starting Data Analytics with Generative AI and Python. The section links point to the parts of the book it draws on.