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

Move all Llama Stack types to llama-stack #279

Merged
merged 3 commits into from
Feb 14, 2025
Merged

Move all Llama Stack types to llama-stack #279

merged 3 commits into from
Feb 14, 2025

Conversation

ashwinb
Copy link
Contributor

@ashwinb ashwinb commented Feb 14, 2025

llama-models should have extremely minimal cruft. Its sole purpose should be didactic -- show the simplest implementation of the llama models and document the prompt formats, etc.

As such:

  • it should not have any "json_schema" registration, etc. since that is only necessary for API generation which is a Llama Stack concern
  • there is a single datatypes.py file at the top-level containing a minimal list of datatypes. Nothing inside llama3/api/ anymore.

Similarly, all the registrations of various Llama SKUs, their parameters, etc. can arguably move to llama stack (although that is debatable) since only the Llama Stack CLI is concerned about those.

NOTE: *This PR cannot be landed until the corresponding llama-stack PR (which removes dependencies on llama-models) lands first. meta-llama/llama-stack#1098 *

Test Plan

(Partial, since most of the tests will be run on the Llama Stack side.)

Run chat completion:

torchrun -m models.scripts.example_chat_completion \
  ~/.llama/checkpoints/Llama3.2-3B-Instruct
torchrun -m models.scripts.multimodal_example_chat_completion \
  ~/.llama/checkpoints/Llama3.2-11B-Vision-Instruct
pytest -s -v models/

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Meta Open Source bot. label Feb 14, 2025
Copy link
Contributor

62 passed

@ashwinb ashwinb merged commit c4d8644 into main Feb 14, 2025
1 check passed
@ashwinb ashwinb deleted the move_to_stack branch February 14, 2025 17:07
ashwinb added a commit to meta-llama/llama-stack that referenced this pull request Feb 14, 2025
…1098)

llama-models should have extremely minimal cruft. Its sole purpose
should be didactic -- show the simplest implementation of the llama
models and document the prompt formats, etc.

This PR is the complement to
meta-llama/llama-models#279

## Test Plan

Ensure all `llama` CLI `model` sub-commands work:

```bash
llama model list
llama model download --model-id ...
llama model prompt-format -m ...
```

Ran tests:
```bash
cd tests/client-sdk
LLAMA_STACK_CONFIG=fireworks pytest -s -v inference/
LLAMA_STACK_CONFIG=fireworks pytest -s -v vector_io/
LLAMA_STACK_CONFIG=fireworks pytest -s -v agents/
```

Create a fresh venv `uv venv && source .venv/bin/activate` and run
`llama stack build --template fireworks --image-type venv` followed by
`llama stack run together --image-type venv` <-- the server runs

Also checked that the OpenAPI generator can run and there is no change
in the generated files as a result.

```bash
cd docs/openapi_generator
sh run_openapi_generator.sh
```
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.

3 participants