Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Update quickstart page to structure things a little more for the novices #1873

Merged
merged 16 commits into from
Apr 10, 2025

Conversation

franciscojavierarceo
Copy link
Collaborator

@franciscojavierarceo franciscojavierarceo commented Apr 4, 2025

What does this PR do?

Another doc enhancement for #1818

Summary of changes:

  • docs/source/distributions/configuration.md

    • Updated dropdown title to include a more user-friendly description.
  • docs/_static/css/my_theme.css

    • Added styling for <h3> elements to set a normal font weight.
  • docs/source/distributions/starting_llama_stack_server.md

    • Changed section headers from bold text to proper markdown headers (e.g., ##).
    • Improved descriptions for starting Llama Stack server using different methods (library, container, conda, Kubernetes).
    • Enhanced clarity and structure by converting instructions into markdown headers and improved formatting.
  • docs/source/getting_started/index.md

    • Major restructuring of the "Quick Start" guide:
      • Added new introductory section for Llama Stack and its capabilities.
      • Reorganized steps into clearer subsections with proper markdown headers.
      • Replaced dropdowns with tabbed content for OS-specific instructions.
      • Added detailed steps for setting up and running the Llama Stack server and client.
      • Introduced new sections for running basic inference and building agents.
      • Enhanced readability and visual structure with emojis, admonitions, and examples.
  • docs/source/providers/index.md

    • Updated the list of LLM inference providers to include "Ollama."
    • Expanded the list of vector databases to include "SQLite-Vec."

Let me know if you need further details!

Test Plan

Renders locally, included screenshot.

Documentation

For #1818

Screenshot 2025-04-09 at 11 07 12 AM

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Meta Open Source bot. label Apr 4, 2025
@franciscojavierarceo franciscojavierarceo changed the title Docs 4 docs: Update quickstart page to structure things a little more for the novices Apr 4, 2025
Copy link
Contributor

@raghotham raghotham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the documentation changes look good. but this PR is changing many more files - is that intentional?

@franciscojavierarceo
Copy link
Collaborator Author

franciscojavierarceo commented Apr 4, 2025

the documentation changes look good. but this PR is changing many more files - is that intentional?

No, I'll fix this, something went wrong when I made a new branch. Will be cleaned up later this evening. Sorry about that.

Update: All cleaned up now!

@franciscojavierarceo franciscojavierarceo force-pushed the docs-4 branch 2 times, most recently from 2504e59 to e9d0517 Compare April 5, 2025 01:26
Signed-off-by: Francisco Javier Arceo <[email protected]>
Signed-off-by: Francisco Javier Arceo <[email protected]>
Signed-off-by: Francisco Javier Arceo <[email protected]>
@franciscojavierarceo
Copy link
Collaborator Author

@raghotham I incorporated the latest changes and fixed the conflicts. Still gives the same structure (i.e., making a install and setup at the beginning).

Signed-off-by: Francisco Javier Arceo <[email protected]>
Signed-off-by: Francisco Javier Arceo <[email protected]>
Signed-off-by: Francisco Javier Arceo <[email protected]>
@franciscojavierarceo
Copy link
Collaborator Author

@raghotham updated 👍

I'll open the other PR after this is closed to show the smaller demo for getting started.

Signed-off-by: Francisco Javier Arceo <[email protected]>
Signed-off-by: Francisco Javier Arceo <[email protected]>
…ven shorter quickstart to highlight value in as few lines of code as possible

Signed-off-by: Francisco Javier Arceo <[email protected]>
Signed-off-by: Francisco Javier Arceo <[email protected]>
@@ -16,3 +16,7 @@
.hide-title h1 {
display: none;
}

h3 {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should it be h2 instead of h3?

Llama Stack config for Ollama.
::::{tab-set}

:::{tab-item} Using Python
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should add conda as well


First lets setup some environment variables and create a local directory to mount into the container’s file system.
```bash
export INFERENCE_MODEL="meta-llama/Llama-3.2-3B-Instruct"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

inference model can be the same as the one used above - we dont need to introduce new names to the same models.

You can reuse the server setup or use the [Llama Stack Client](https://github.com/meta-llama/llama-stack-client-python/).
Note that the client package is already included in the `llama-stack` package.

### ii. Using the Llama Stack Client
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is no ### i.

```

## Step 4: Run Basic Inference
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the rest of the "steps" are just different examples.

source .venv/bin/activate
export INFERENCE_MODEL="llama3.2:3b"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why have the env var here?

from llama_stack_client import LlamaStackClient
from llama_stack_client import Agent, AgentEventLogger
from termcolor import cprint
from llama_stack.distribution.library_client import LlamaStackAsLibraryClient
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we dont want library as client - let's use server please.

]
vector_db = "faiss"
vector_db_id = "test-vector-db"
model_id = "llama3.2:3b-instruct-fp16"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wrong model id - it should be llama3.2:3b

client.vector_dbs.register(
provider_id=vector_db,
vector_db_id=vector_db_id,
embedding_model="all-MiniLM-L6-v2",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

embedding model showed up here - can we retrieve it from the distro server?

@raghotham
Copy link
Contributor

will make minor fixes after merging this PR

@raghotham raghotham closed this Apr 10, 2025
@raghotham raghotham reopened this Apr 10, 2025
@raghotham raghotham merged commit 49955a0 into meta-llama:main Apr 10, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Meta Open Source bot.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants