mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-03 09:53:45 +00:00
# What does this PR do? This PR improves type hint cleanup in auto-generated provider documentation by adding regex logic. **Issues Fixed:** - Type hints with missing closing brackets (e.g., `list[str` instead of `list[str]`) - Types showing as `<class 'bool'>`, `<class 'str'>` instead of `bool`, `str` - The multi-line YAML frontmatter in index documentation files wasn't ideal, so we now add the proper `|` character. **Changes:** 1. Replaced string replacement (`.replace`) with regex-based type cleaning to preserve the trailing bracket in case of `list` and `dict`. 2. Adds the `|` character for multi-line YAML descriptions. 3. I have regenerated the docs. However, let me know if that's not needed. ## Test Plan 1. Ran uv run python scripts/provider_codegen.py - successfully regenerated all docs 2. We can see that the updated docs handle correctly type hint cleanup and multi-line yaml descriptions have now the `|` character. ### Note to the reviewer(s) This is my first contribution to your lovely repo! Initially I was going thourgh docs (wanted to use `remote::gemini` as provider) and realized the issue. I've read the [CONTRIBUTING.md](https://github.com/llamastack/llama-stack/blob/main/CONTRIBUTING.md) and decided to open the PR. Let me know if there's anything I did wrong and I'll update my PR! --------- Signed-off-by: thepetk <thepetk@gmail.com> Co-authored-by: Ashwin Bharambe <ashwin.bharambe@gmail.com>
36 lines
1.2 KiB
Text
36 lines
1.2 KiB
Text
---
|
|
description: "Meta's reference implementation of inference with support for various model formats and optimization techniques."
|
|
sidebar_label: Meta-Reference
|
|
title: inline::meta-reference
|
|
---
|
|
|
|
# inline::meta-reference
|
|
|
|
## Description
|
|
|
|
Meta's reference implementation of inference with support for various model formats and optimization techniques.
|
|
|
|
## Configuration
|
|
|
|
| Field | Type | Required | Default | Description |
|
|
|-------|------|----------|---------|-------------|
|
|
| `model` | `str \| None` | No | | |
|
|
| `torch_seed` | `int \| None` | No | | |
|
|
| `max_seq_len` | `int` | No | 4096 | |
|
|
| `max_batch_size` | `int` | No | 1 | |
|
|
| `model_parallel_size` | `int \| None` | No | | |
|
|
| `create_distributed_process_group` | `bool` | No | True | |
|
|
| `checkpoint_dir` | `str \| None` | No | | |
|
|
| `quantization` | `Bf16QuantizationConfig \| Fp8QuantizationConfig \| Int4QuantizationConfig \| None` | No | | |
|
|
|
|
## Sample Configuration
|
|
|
|
```yaml
|
|
model: Llama3.2-3B-Instruct
|
|
checkpoint_dir: ${env.CHECKPOINT_DIR:=null}
|
|
quantization:
|
|
type: ${env.QUANTIZATION_TYPE:=bf16}
|
|
model_parallel_size: ${env.MODEL_PARALLEL_SIZE:=0}
|
|
max_batch_size: ${env.MAX_BATCH_SIZE:=1}
|
|
max_seq_len: ${env.MAX_SEQ_LEN:=4096}
|
|
```
|