---
title: "fromHuggingface"
sidebar_label: "fromHuggingface"
description: "Kotlin binding reference: fromHuggingface."
---

<!-- Generated by tools/api_reference/generate_api_docs.py. Do not edit. -->

//[clika-runtime](../../../../index.md)/[io.clika.runtime](../../index.md)/[Tokenizer](../index.md)/[Companion](index.md)/[fromHuggingface](fromHuggingface.md)

# fromHuggingface

[common]\
fun [fromHuggingface](fromHuggingface.md)(path: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)): [Tokenizer](../index.md)

Load a Hugging Face tokenizer from a model directory or one artifact file, with the sibling `tokenizer_config.json` read for the special ids and the chat template when present.