> ## Documentation Index
> Fetch the complete documentation index at: https://docs.phidata.com/llms.txt
> Use this file to discover all available pages before exploring further.

# HuggingFace

## Example

<CodeGroup>
  ```python agent.py theme={null}
  from phi.agent import Agent
  from phi.model.huggingface import HuggingFaceChat

  agent = Agent(
      model=HuggingFaceChat(
          id="meta-llama/Meta-Llama-3-8B-Instruct",
          max_tokens=4096,
      ),
      markdown=True
  )

  agent.print_response("Share a 2 sentence horror story")
  ```
</CodeGroup>

## HuggingFace Params

<Snippet file="model-hf-params.mdx" />

`HuggingFaceChat` is a subclass of the [Model](/reference/model/base) class and has access to the same params.
