# Inference config for Llama 8B Instruct.
#
# Requirements:
#   - Run `pip install oumi[gpu]`
#   - Log into HF: `hf auth login`
#   - Request access to Llama 3.1: https://huggingface.co/meta-llama/Llama-3.1-8B-Instruct
#
# Usage:
#   oumi infer -i -c configs/recipes/llama3_1/inference/8b_rvllm_infer.yaml
#
# Sample command to start vLLM server:
# python -u -m vllm.entrypoints.openai.api_server \
#   --port 6864 \
#   --model meta-llama/Llama-3.1-8B-Instruct  \
#   --trust-remote-code \
#   --dtype=bfloat16 \
#   --device=cuda \
#   --max-model-len 2048 \
#   --enforce-eager \
#   --disable-custom-all-reduce \
#   --disable-log-requests \
#   --max_num_seqs=2 \
#   --enable-chunked-prefill=false \
#   --gpu-memory-utilization=0.95 \
#   --tensor-parallel-size 1
#
# See Also:
#   - Documentation: https://oumi.ai/docs/en/latest/user_guides/infer/infer.html
#   - Config class: oumi.core.configs.InferenceConfig
#   - Config source: https://github.com/oumi-ai/oumi/blob/main/src/oumi/core/configs/inference_config.py
#   - Other inference configs: configs/**/inference/

model:
  model_name: "meta-llama/Llama-3.1-8B-Instruct"
  model_max_length: 2048
  torch_dtype_str: "bfloat16"
  attn_implementation: "sdpa"
  load_pretrained_weights: True
  trust_remote_code: True

generation:
  max_new_tokens: 2048

remote_params:
  # This address is just an example (it's what you may get when you start vllm sever locally).
  # For details, see https://platform.openai.com/docs/api-reference/chat/create
  api_url: "http://localhost:6864/v1/chat/completions"

engine: REMOTE_VLLM
