Huggingface.js documentation

๐Ÿค— Hugging Face Inference

Hugging Face's logo
Join the Hugging Face community

and get access to the augmented documentation experience

to get started

๐Ÿค— Hugging Face Inference

Hugging Face Hub์— ํ˜ธ์ŠคํŒ…๋œ ๋ชจ๋ธ์— ๋Œ€ํ•ด ์—ฌ๋Ÿฌ ์„œ๋น„์Šค์—์„œ ์ถ”๋ก ์„ ์‹คํ–‰ํ•  ์ˆ˜ ์žˆ๋Š” ํ†ตํ•ฉ ์ธํ„ฐํŽ˜์ด์Šค๋ฅผ ์ œ๊ณตํ•˜๋Š” Typescript ๊ธฐ๋ฐ˜ ๋ž˜ํผ์ž…๋‹ˆ๋‹ค:

  1. Inference Providers: ์„œ๋ฒ„๋ฆฌ์Šค ์ถ”๋ก  ํŒŒํŠธ๋„ˆ๊ฐ€ ์ œ๊ณตํ•˜๋Š” ์ˆ˜๋ฐฑ ๊ฐœ์˜ ๋จธ์‹ ๋Ÿฌ๋‹ ๋ชจ๋ธ์— ๋Œ€ํ•œ ๊ฐ„์†Œํ™”๋˜๊ณ  ํ†ตํ•ฉ๋œ ์ ‘๊ทผ ๋ฐฉ์‹์ž…๋‹ˆ๋‹ค. ์ด ์ƒˆ๋กœ์šด ์ ‘๊ทผ ๋ฐฉ์‹์€ ๊ธฐ์กด์˜ Serverless Inference API๋ฅผ ๊ธฐ๋ฐ˜์œผ๋กœ ํ•˜๋ฉฐ, ์„ธ๊ณ„ ์ˆ˜์ค€์˜ ์ œ๊ณต์—…์ฒด ๋•๋ถ„์— ๋” ๋งŽ์€ ๋ชจ๋ธ, ํ–ฅ์ƒ๋œ ์„ฑ๋Šฅ, ๊ทธ๋ฆฌ๊ณ  ๋” ๋†’์€ ์‹ ๋ขฐ์„ฑ์„ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค. ์ง€์›๋˜๋Š” ์ œ๊ณต์—…์ฒด ๋ชฉ๋ก์€ ๋ฌธ์„œ๋ฅผ ์ฐธ์กฐํ•˜์„ธ์š”.
  2. Inference Endpoints: ๋ชจ๋ธ์„ ํ”„๋กœ๋•์…˜์— ์‰ฝ๊ฒŒ ๋ฐฐํฌํ•  ์ˆ˜ ์žˆ๋Š” ์ œํ’ˆ์ž…๋‹ˆ๋‹ค. ์ถ”๋ก ์€ ์‚ฌ์šฉ์ž๊ฐ€ ์„ ํƒํ•œ ํด๋ผ์šฐ๋“œ ์ œ๊ณต์ž์˜ ์ „์šฉ, ์™„์ „ ๊ด€๋ฆฌํ˜• ์ธํ”„๋ผ์—์„œ Hugging Face์— ์˜ํ•ด ์‹คํ–‰๋ฉ๋‹ˆ๋‹ค.
  3. ๋กœ์ปฌ ์—”๋“œํฌ์ธํŠธ: ํด๋ผ์ด์–ธํŠธ๋ฅผ ์ด๋Ÿฌํ•œ ๋กœ์ปฌ ์—”๋“œํฌ์ธํŠธ์— ์—ฐ๊ฒฐํ•˜์—ฌ llama.cpp, Ollama, vLLM, LiteLLM, ๋˜๋Š” Text Generation Inference (TGI)์™€ ๊ฐ™์€ ๋กœ์ปฌ ์ถ”๋ก  ์„œ๋ฒ„๋กœ ์ถ”๋ก ์„ ์‹คํ–‰ํ•  ์ˆ˜๋„ ์žˆ์Šต๋‹ˆ๋‹ค.

์‹œ์ž‘ํ•˜๊ธฐ

์„ค์น˜

๋…ธ๋“œ

npm install @huggingface/inference

pnpm add @huggingface/inference

yarn add @huggingface/inference

Deno

// esm.sh
import { InferenceClient } from "https://esm.sh/@huggingface/inference";
// or npm:
import { InferenceClient } from "npm:@huggingface/inference";

์ดˆ๊ธฐํ™”

import { InferenceClient } from '@huggingface/inference';

const hf = new InferenceClient('your access token');

โ—์ค‘์š”ํ•œ ์ฐธ๊ณ  ์‚ฌํ•ญ: ํ•ญ์ƒ ์•ก์„ธ์Šค ํ† ํฐ์„ ์ „๋‹ฌํ•˜์„ธ์š”. Hugging Face์— ๊ฐ€์ž…ํ•œ ํ›„ access tokens ํŽ˜์ด์ง€๋ฅผ ๋ฐฉ๋ฌธํ•˜์—ฌ ๋ฌด๋ฃŒ๋กœ ์•ก์„ธ์Šค ํ† ํฐ์„ ์ƒ์„ฑํ•˜์„ธ์š”.

access token์€ ๋น„๊ณต๊ฐœ๋กœ ์œ ์ง€ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. ํ”„๋ก ํŠธ์—”๋“œ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์—์„œ ์ด๋ฅผ ๋ณดํ˜ธํ•ด์•ผ ํ•˜๋Š” ๊ฒฝ์šฐ, access token์„ ์ €์žฅํ•˜๋Š” ํ”„๋ก์‹œ ์„œ๋ฒ„๋ฅผ ์„ค์ •ํ•˜๋Š” ๊ฒƒ์„ ๊ถŒ์žฅํ•ฉ๋‹ˆ๋‹ค.

Inference Providers ์‚ฌ์šฉ

inference client๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์„œ๋“œํŒŒํ‹ฐ ์ œ๊ณต์—…์ฒด์— ์ถ”๋ก  ์š”์ฒญ์„ ๋ณด๋‚ผ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

ํ˜„์žฌ ๋‹ค์Œ ํ”„๋กœ๋ฐ”์ด๋”๋ฅผ ์ง€์›ํ•ฉ๋‹ˆ๋‹ค:

์„œ๋“œํŒŒํ‹ฐ ํ”„๋กœ๋ฐ”์ด๋”์— ์š”์ฒญ์„ ๋ณด๋‚ด๋ ค๋ฉด ์ถ”๋ก  ํ•จ์ˆ˜์— provider ๋งค๊ฐœ๋ณ€์ˆ˜๋ฅผ ์ „๋‹ฌํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. provider ๋งค๊ฐœ๋ณ€์ˆ˜์˜ ๊ธฐ๋ณธ๊ฐ’์€ โ€œautoโ€์ด๋ฉฐ, ์ด๋Š” https://hf.co/settings/inference-providers์—์„œ ์„ค์ •ํ•œ ์„ ํ˜ธ ์ˆœ์„œ๋Œ€๋กœ ์ •๋ ฌ๋œ ๋ชจ๋ธ์— ์‚ฌ์šฉ ๊ฐ€๋Šฅํ•œ ํ”„๋กœ๋ฐ”์ด๋” ์ค‘ ์ฒซ ๋ฒˆ์งธ๋ฅผ ์„ ํƒํ•ฉ๋‹ˆ๋‹ค.

const accessToken = "hf_..."; // Either a HF access token, or an API key from the third-party provider (Replicate in this example)

const client = new InferenceClient(accessToken);
await client.textToImage({
  provider: "replicate",
  model:"black-forest-labs/Flux.1-dev",
  inputs: "A black forest cake"
})

์š”์ฒญ์ด ์•ก์„ธ์Šค ํ† ํฐ์œผ๋กœ ์ธ์ฆ๋˜์—ˆ๋Š”์ง€ ํ™•์ธํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. Hugging Face ์•ก์„ธ์Šค ํ† ํฐ์œผ๋กœ ์ธ์ฆ๋œ ๊ฒฝ์šฐ, ์š”์ฒญ์€ https://huggingface.co.๋ฅผ ํ†ตํ•ด ๋ผ์šฐํŒ…๋ฉ๋‹ˆ๋‹ค. ์„œ๋“œํŒŒํ‹ฐ ์ œ๊ณต์ž ํ‚ค๋กœ ์ธ์ฆ๋œ ๊ฒฝ์šฐ, ์š”์ฒญ์€ ํ•ด๋‹น ์ œ๊ณต์ž์˜ ์ถ”๋ก  API์— ์ง์ ‘ ์ „์†ก๋ฉ๋‹ˆ๋‹ค.

์„œ๋“œํŒŒํ‹ฐ ์ œ๊ณต์ž๋ฅผ ์š”์ฒญํ•  ๊ฒฝ์šฐ ์ผ๋ถ€ ๋ชจ๋ธ๋งŒ ์ง€์›๋ฉ๋‹ˆ๋‹ค. ํŒŒ์ดํ”„๋ผ์ธ ์ž‘์—…๋ณ„ ์ง€์› ๋ชจ๋ธ ๋ชฉ๋ก์€ ์—ฌ๊ธฐ์„œ ํ™•์ธํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค:

โ—์ค‘์š” ์ฐธ๊ณ : ํ˜ธํ™˜์„ฑ์„ ์œ„ํ•ด ์„œ๋“œํŒŒํ‹ฐ API๋Š” ๊ฐ ํŒŒ์ดํ”„๋ผ์ธ ์ž‘์—… ์œ ํ˜•์— ๋Œ€ํ•ด HF ๋ชจ๋ธ ํŽ˜์ด์ง€์—์„œ ๊ธฐ๋Œ€ํ•˜๋Š” โ€œํ‘œ์ค€โ€ shape API๋ฅผ ์ค€์ˆ˜ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. LLM์˜ ๊ฒฝ์šฐ ๋ชจ๋“  ์‚ฌ์šฉ์ž๊ฐ€ OpenAI API๋กœ ์ˆ˜๋ ดํ–ˆ๊ธฐ ๋•Œ๋ฌธ์— ๋ฌธ์ œ๊ฐ€ ๋˜์ง€ ์•Š์ง€๋งŒ, ํ‘œ์ค€ API๊ฐ€ ์กด์žฌํ•˜์ง€ ์•Š๋Š” โ€œtext-to-imageโ€๋‚˜ โ€œautomatic-speech-recognitionโ€๊ณผ ๊ฐ™์€ ๋‹ค๋ฅธ ์ž‘์—…์—์„œ๋Š” ๋” ๊นŒ๋‹ค๋กœ์šธ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ๋„์›€์ด ํ•„์š”ํ•˜์‹œ๊ฑฐ๋‚˜ ๋” ์‰ฝ๊ฒŒ ๋งŒ๋“ค ์ˆ˜ ์žˆ๋Š” ๋ถ€๋ถ„์ด ์žˆ๋‹ค๋ฉด ์•Œ๋ ค์ฃผ์„ธ์š”!

๐Ÿ‘‹๋‹ค๋ฅธ ํ”„๋กœ๋ฐ”์ด๋”๋ฅผ ์ถ”๊ฐ€ํ•˜๊ณ  ์‹ถ์œผ์‹ ๊ฐ€์š”? ๋‹ค๋ฅธ Inference ํ”„๋กœ๋ฐ”์ด๋”์— ๋Œ€ํ•œ ์ง€์›์„ ์ถ”๊ฐ€ํ•˜๊ฑฐ๋‚˜, https://huggingface.co/spaces/huggingface/HuggingDiscussions/discussions/49์—์„œ ์š”์ฒญ์„ ๋‚จ๊ธฐ๋ ค๋ฉด ๋ฌธ์˜ํ•ด ์ฃผ์„ธ์š”.

Tree-shaking

InferenceClient ํด๋ž˜์Šค๋ฅผ ์‚ฌ์šฉํ•˜์ง€ ์•Š๊ณ  ๋ชจ๋“ˆ์—์„œ ํ•„์š”ํ•œ ํ•จ์ˆ˜๋ฅผ ์ง์ ‘ ๊ฐ€์ ธ์˜ฌ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

import { textGeneration } from "@huggingface/inference";

await textGeneration({
  accessToken: "hf_...",
  model: "model_or_endpoint",
  inputs: ...,
  parameters: ...
})

์ด๊ฒƒ์€ ๋ฒˆ๋“ค๋Ÿฌ์˜ ํŠธ๋ฆฌ ์…ฐ์ดํ‚น์„ ํ™œ์„ฑํ™”ํ•ฉ๋‹ˆ๋‹ค.

์˜ค๋ฅ˜ ์ฒ˜๋ฆฌ

inference ํŒจํ‚ค์ง€๋Š” ๋‹ค์–‘ํ•œ ์˜ค๋ฅ˜ ์‹œ๋‚˜๋ฆฌ์˜ค๋ฅผ ํšจ๊ณผ์ ์œผ๋กœ ์ฒ˜๋ฆฌํ•  ์ˆ˜ ์žˆ๋„๋ก ๊ตฌ์ฒด์ ์ธ ์˜ค๋ฅ˜ ์œ ํ˜•์„ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค.

์˜ค๋ฅ˜ ์œ ํ˜•

์ด ํŒจํ‚ค์ง€๋Š” ๊ธฐ๋ณธ Error ํด๋ž˜์Šค๋ฅผ ํ™•์žฅํ•˜๋Š” ์—ฌ๋Ÿฌ ์˜ค๋ฅ˜ ์œ ํ˜•์„ ์ •์˜ํ•ฉ๋‹ˆ๋‹ค:

  • InferenceClientError: Hugging Face Inference์˜ ๋ชจ๋“  ์˜ค๋ฅ˜์— ๋Œ€ํ•œ ๊ธฐ๋ณธ ์˜ค๋ฅ˜ ํด๋ž˜์Šค
  • InferenceClientInputError: ์ž…๋ ฅ ๋งค๊ฐœ๋ณ€์ˆ˜์— ๋ฌธ์ œ๊ฐ€ ์žˆ์„ ๋•Œ ๋ฐœ์ƒ
  • InferenceClientProviderApiError: ํ”„๋กœ๋ฐ”์ด๋”์—์„œ API ์ˆ˜์ค€์˜ ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ–ˆ์„ ๋•Œ throw๋ฉ๋‹ˆ๋‹ค
  • InferenceClientHubApiError: Hugging Face Hub์—์„œ API ์ˆ˜์ค€์˜ ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ–ˆ์„ ๋•Œ ๋ฐœ์ƒ
  • InferenceClientProviderOutputError: ํ”„๋กœ๋ฐ”์ด๋”์˜ API ์‘๋‹ต ํ˜•์‹์— ๋ฌธ์ œ๊ฐ€ ์žˆ์„ ๋•Œ ๋ฐœ์ƒ

์‚ฌ์šฉ ์˜ˆ์‹œ

import { InferenceClient } from "@huggingface/inference";
import {
  InferenceClientError,
  InferenceClientInputError,
  InferenceClientProviderApiError,
  InferenceClientProviderOutputError,
  InferenceClientHubApiError,
} from "@huggingface/inference";

const client = new InferenceClient();

try {
  const result = await client.textGeneration({
    model: "gpt2",
    inputs: "Hello, I'm a language model",
  });
} catch (error) {
  if (error instanceof InferenceClientProviderApiError) {
    // Handle API errors (e.g., rate limits, authentication issues)
    console.error("Provider API Error:", error.message);
    console.error("HTTP Request details:", error.httpRequest);
    console.error("HTTP Response details:", error.httpResponse);
  } else if (error instanceof InferenceClientHubApiError) {
    // Handle API errors (e.g., rate limits, authentication issues)
    console.error("Hub API Error:", error.message);
    console.error("HTTP Request details:", error.httpRequest);
    console.error("HTTP Response details:", error.httpResponse);
  } else if (error instanceof InferenceClientProviderOutputError) {
    // Handle malformed responses from providers
    console.error("Provider Output Error:", error.message);
  } else if (error instanceof InferenceClientInputError) {
    // Handle invalid input parameters
    console.error("Input Error:", error.message);
  } else {
    // Handle unexpected errors
    console.error("Unexpected error:", error);
  }
}

/// Catch all errors from @huggingface/inference
try {
  const result = await client.textGeneration({
    model: "gpt2",
    inputs: "Hello, I'm a language model",
  });
} catch (error) {
  if (error instanceof InferenceClientError) {
    // Handle errors from @huggingface/inference
    console.error("Error from InferenceClient:", error);
  } else {
    // Handle unexpected errors
    console.error("Unexpected error:", error);
  }
}

์˜ค๋ฅ˜ ์„ธ๋ถ€ ์ •๋ณด

InferenceClientProviderApiError

์„ ํƒํ•œ provider์—์„œ ์ถ”๋ก ์„ ์ˆ˜ํ–‰ํ•˜๋Š” ๋™์•ˆ API ์š”์ฒญ์— ๋ฌธ์ œ๊ฐ€ ์žˆ์„ ๋•Œ ์ด ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค.

์—ฌ๋Ÿฌ ๊ฐ€์ง€ ์†์„ฑ์ด ์žˆ์Šต๋‹ˆ๋‹ค:

  • message: ์„ค๋ช…์ ์ธ ์˜ค๋ฅ˜ ๋ฉ”์‹œ์ง€
  • httpRequest: ์‹คํŒจํ•œ ์š”์ฒญ์— ๋Œ€ํ•œ ์„ธ๋ถ€ ์ •๋ณด(URL, method, headers)
  • httpResponse: ์ƒํƒœ ์ฝ”๋“œ์™€ ๋ณธ๋ฌธ์ด ํฌํ•จ๋œ ์‘๋‹ต ์„ธ๋ถ€ ์ •๋ณด

InferenceClientHubApiError

Hugging Face Hub API๋ฅผ ์š”์ฒญํ•  ๋•Œ API ์š”์ฒญ์— ๋ฌธ์ œ๊ฐ€ ์žˆ์œผ๋ฉด ์ด ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค.

์—ฌ๋Ÿฌ ๊ฐ€์ง€ ์†์„ฑ์ด ์žˆ์Šต๋‹ˆ๋‹ค:

  • message: ์„ค๋ช…์ ์ธ ์˜ค๋ฅ˜ ๋ฉ”์‹œ์ง€
  • httpRequest: ์‹คํŒจํ•œ ์š”์ฒญ์— ๋Œ€ํ•œ ์„ธ๋ถ€ ์ •๋ณด(URL, method, headers)
  • httpResponse: ์ƒํƒœ ์ฝ”๋“œ์™€ ๋ณธ๋ฌธ์ด ํฌํ•จ๋œ ์‘๋‹ต ์„ธ๋ถ€ ์ •๋ณด

InferenceClientProviderOutputError

์ด ์˜ค๋ฅ˜๋Š” ํ”„๋กœ๋ฐ”์ด๋”๊ฐ€ ์˜ˆ์ƒํ•˜์ง€ ๋ชปํ•œ ํ˜•์‹์œผ๋กœ ์‘๋‹ต์„ ๋ฐ˜ํ™˜ํ•  ๋•Œ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค.

InferenceClientInputError

์ด ์˜ค๋ฅ˜๋Š” ์ž…๋ ฅ ๋งค๊ฐœ๋ณ€์ˆ˜๊ฐ€ ์ž˜๋ชป๋˜์—ˆ๊ฑฐ๋‚˜ ๋ˆ„๋ฝ๋œ ๊ฒฝ์šฐ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค. ์˜ค๋ฅ˜ ๋ฉ”์‹œ์ง€๋Š” ์ž…๋ ฅ์˜ ๋ฌธ์ œ์ ์„ ์„ค๋ช…ํ•ฉ๋‹ˆ๋‹ค.

์ž์—ฐ์–ด ์ฒ˜๋ฆฌ

ํ…์ŠคํŠธ ์ƒ์„ฑ

์ž…๋ ฅ ํ”„๋กฌํ”„ํŠธ์—์„œ ํ…์ŠคํŠธ๋ฅผ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค.

await hf.textGeneration({
  model: 'mistralai/Mixtral-8x7B-v0.1',
  provider: "together",
  inputs: 'The answer to the universe is'
})

for await (const output of hf.textGenerationStream({
  model: "mistralai/Mixtral-8x7B-v0.1",
  provider: "together",
  inputs: 'repeat "one two three four"',
  parameters: { max_new_tokens: 250 }
})) {
  console.log(output.token.text, output.generated_text);
}

์ฑ„ํŒ… ์™„์„ฑ

๋Œ€ํ™” ๋‚ด์šฉ์„ ๊ตฌ์„ฑํ•˜๋Š” ๋ฉ”์‹œ์ง€ ๋ชฉ๋ก์—์„œ ๋ชจ๋ธ ์‘๋‹ต์„ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค.

// Non-streaming API
const out = await hf.chatCompletion({
  model: "Qwen/Qwen3-32B",
  provider: "cerebras",
  messages: [{ role: "user", content: "Hello, nice to meet you!" }],
  max_tokens: 512,
  temperature: 0.1,
});

// Streaming API
let out = "";
for await (const chunk of hf.chatCompletionStream({
  model: "Qwen/Qwen3-32B",
  provider: "cerebras",
  messages: [
    { role: "user", content: "Can you help me solve an equation?" },
  ],
  max_tokens: 512,
  temperature: 0.1,
})) {
  if (chunk.choices && chunk.choices.length > 0) {
    out += chunk.choices[0].delta.content;
  }
}

Feature Extraction

์ด ์ž‘์—…์€ ํ…์ŠคํŠธ๋ฅผ ์ฝ๊ณ , ์ผ๋ฐ˜์ ์œผ๋กœ ์˜๋ฏธ๋ก ์  ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค/์˜๋ฏธ๋ก ์  ๊ฒ€์ƒ‰์˜ ์ผ๋ถ€๋กœ ์†Œ๋น„๋˜๋Š” ์›์‹œ float ๊ฐ’์„ ์ถœ๋ ฅํ•ฉ๋‹ˆ๋‹ค.

await hf.featureExtraction({
  model: "sentence-transformers/distilbert-base-nli-mean-tokens",
  inputs: "That is a happy person",
});

Fill Mask

๋ˆ„๋ฝ๋œ ๋‹จ์–ด(์ •ํ™•ํžˆ๋Š” ํ† ํฐ)๋กœ ๊ตฌ๋ฉ์„ ์ฑ„์šฐ๋„๋ก ์‹œ๋„ํ•ฉ๋‹ˆ๋‹ค.

await hf.fillMask({
  model: 'bert-base-uncased',
  inputs: '[MASK] world!'
})

์š”์•ฝ

๊ธด ํ…์ŠคํŠธ๋ฅผ ์งง์€ ํ…์ŠคํŠธ๋กœ ์š”์•ฝํ•ฉ๋‹ˆ๋‹ค. ์ฃผ์˜: ์ผ๋ถ€ ๋ชจ๋ธ์€ ์ž…๋ ฅ ๊ธธ์ด์— ์ตœ๋Œ€ ์ œํ•œ์ด ์žˆ์Šต๋‹ˆ๋‹ค.

await hf.summarization({
  model: 'facebook/bart-large-cnn',
  inputs:
    'The tower is 324 metres (1,063 ft) tall, about the same height as an 81-storey building, and the tallest structure in Paris. Its base is square, measuring 125 metres (410 ft) on each side. During its construction, the Eiffel Tower surpassed the Washington Monument to become the tallest man-made structure in the world, a title it held for 41 years until the Chrysler Building in New York City was finished in 1930.',
  parameters: {
    max_length: 100
  }
})

์งˆ๋ฌธ ๋‹ต๋ณ€

์ œ๊ณตํ•˜๋Š” ์ปจํ…์ŠคํŠธ๋ฅผ ๊ธฐ๋ฐ˜์œผ๋กœ ์งˆ๋ฌธ์— ๋‹ต๋ณ€ํ•ฉ๋‹ˆ๋‹ค.

await hf.questionAnswering({
  model: 'deepset/roberta-base-squad2',
  inputs: {
    question: 'What is the capital of France?',
    context: 'The capital of France is Paris.'
  }
})

ํ…Œ์ด๋ธ” ์งˆ์˜์‘๋‹ต

await hf.tableQuestionAnswering({
  model: 'google/tapas-base-finetuned-wtq',
  inputs: {
    query: 'How many stars does the transformers repository have?',
    table: {
      Repository: ['Transformers', 'Datasets', 'Tokenizers'],
      Stars: ['36542', '4512', '3934'],
      Contributors: ['651', '77', '34'],
      'Programming language': ['Python', 'Python', 'Rust, Python and NodeJS']
    }
  }
})

ํ…์ŠคํŠธ ๋ถ„๋ฅ˜

๊ฐ์ • ๋ถ„์„์— ์ž์ฃผ ์‚ฌ์šฉ๋˜๋Š” ์ด ๋ฐฉ๋ฒ•์€ ์ฃผ์–ด์ง„ ํ…์ŠคํŠธ์— ๋ผ๋ฒจ์„ ํ• ๋‹นํ•˜๊ณ  ํ•ด๋‹น ๋ผ๋ฒจ์˜ ํ™•๋ฅ  ์ ์ˆ˜๋ฅผ ํ•จ๊ป˜ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค.

await hf.textClassification({
  model: 'distilbert-base-uncased-finetuned-sst-2-english',
  inputs: 'I like you. I love you.'
})

ํ† ํฐ ๋ถ„๋ฅ˜

๋ฌธ์žฅ ๋ถ„์„์— ์‚ฌ์šฉ๋˜๋ฉฐ, ๋ฌธ๋ฒ• ๋ถ„์„ ๋˜๋Š” ํ…์ŠคํŠธ์— ํฌํ•จ๋œ ํ‚ค์›Œ๋“œ๋ฅผ ์ดํ•ดํ•˜๊ธฐ ์œ„ํ•œ Named Entity Recognition (NER)์„ ์ˆ˜ํ–‰ํ•ฉ๋‹ˆ๋‹ค.

await hf.tokenClassification({
  model: 'dbmdz/bert-large-cased-finetuned-conll03-english',
  inputs: 'My name is Sarah Jessica Parker but you can call me Jessica'
})

๋ฒˆ์—ญ

ํ•œ ์–ธ์–ด์˜ ํ…์ŠคํŠธ๋ฅผ ๋‹ค๋ฅธ ์–ธ์–ด๋กœ ๋ณ€ํ™˜ํ•ฉ๋‹ˆ๋‹ค.

await hf.translation({
  model: 't5-base',
  inputs: 'My name is Wolfgang and I live in Berlin'
})

await hf.translation({
  model: 'facebook/mbart-large-50-many-to-many-mmt',
  inputs: textToTranslate,
  parameters: {
  "src_lang": "en_XX",
  "tgt_lang": "fr_XX"
 }
})

Zero-Shot ๋ถ„๋ฅ˜

โ€ฆ

await hf.zeroShotClassification({
  model: 'facebook/bart-large-mnli',
  inputs: [
    'Hi, I recently bought a device from your company but it is not working as advertised and I would like to get reimbursed!'
  ],
  parameters: { candidate_labels: ['refund', 'legal', 'faq'] }
})

๋ฌธ์žฅ ์œ ์‚ฌ๋„

ํ•˜๋‚˜์˜ ํ…์ŠคํŠธ์™€ ๋‹ค๋ฅธ ๋ฌธ์žฅ ๋ชฉ๋ก ์‚ฌ์ด์˜ ์˜๋ฏธ ์œ ์‚ฌ๋„๋ฅผ ๊ณ„์‚ฐํ•ฉ๋‹ˆ๋‹ค.

await hf.sentenceSimilarity({
  model: 'sentence-transformers/paraphrase-xlm-r-multilingual-v1',
  inputs: {
    source_sentence: 'That is a happy person',
    sentences: [
      'That is a happy dog',
      'That is a very happy person',
      'Today is a sunny day'
    ]
  }
})

ํ…์ŠคํŠธ ๋žญํ‚น

์ฟผ๋ฆฌ์— ๋Œ€ํ•œ ๊ด€๋ จ์„ฑ ์ˆœ์„œ๋กœ ๋ฌธ์„œ๋ฅผ ์ •๋ ฌํ•ฉ๋‹ˆ๋‹ค.

await hf.textRanking({
  model: 'cross-encoder/ettin-reranker-68m-v1',
  inputs: {
    query: 'Which planet is known as the Red Planet?',
    texts: [
      "Venus is often called Earth's twin because of its similar size and proximity.",
      'Mars, known for its reddish appearance, is often referred to as the Red Planet.',
      'Jupiter, the largest planet in our solar system, has a prominent red spot.',
      'Saturn, famous for its rings, is sometimes mistaken for the Red Planet.'
    ]
  }
})

์˜ค๋””์˜ค

์ž๋™ ์Œ์„ฑ ์ธ์‹

์˜ค๋””์˜ค ํŒŒ์ผ์—์„œ ์Œ์„ฑ ์ „์‚ฌ๋ฅผ ์ˆ˜ํ–‰ํ•ฉ๋‹ˆ๋‹ค.

๋ฐ๋ชจ

await hf.automaticSpeechRecognition({
  model: 'facebook/wav2vec2-large-960h-lv60-self',
  data: readFileSync('test/sample1.flac')
})

์˜ค๋””์˜ค ๋ถ„๋ฅ˜

์ฃผ์–ด์ง„ ์˜ค๋””์˜ค์— ๋ผ๋ฒจ์„ ํ• ๋‹นํ•˜๊ณ  ํ•ด๋‹น ๋ผ๋ฒจ์˜ ํ™•๋ฅ  ์ ์ˆ˜๋ฅผ ํ•จ๊ป˜ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค.

๋ฐ๋ชจ

await hf.audioClassification({
  model: 'superb/hubert-large-superb-er',
  data: readFileSync('test/sample1.flac')
})

ํ…์ŠคํŠธ ์Œ์„ฑ ๋ณ€ํ™˜

ํ…์ŠคํŠธ ์ž…๋ ฅ์—์„œ ์ž์—ฐ์Šค๋Ÿฌ์šด ์Œ์„ฑ์˜ ์Œ์„ฑ ํ•ฉ์„ฑ์„ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค.

์ธํ„ฐ๋ž™ํ‹ฐ๋ธŒ ํŠœํ† ๋ฆฌ์–ผ

await hf.textToSpeech({
  model: 'espnet/kan-bayashi_ljspeech_vits',
  inputs: 'Hello world!'
})

์˜ค๋””์˜ค์—์„œ ์˜ค๋””์˜ค๋กœ

์ž…๋ ฅ ์˜ค๋””์˜ค์—์„œ ํ•˜๋‚˜ ์ด์ƒ์˜ ์ƒ์„ฑ๋œ ์˜ค๋””์˜ค๋ฅผ ์ถœ๋ ฅํ•˜๋ฉฐ, ์ฃผ๋กœ ์Œ์„ฑ ํ–ฅ์ƒ ๋ฐ ์†Œ์Šค ๋ถ„๋ฆฌ(source separation)์— ์‚ฌ์šฉ๋ฉ๋‹ˆ๋‹ค.

await hf.audioToAudio({
  model: 'speechbrain/sepformer-wham',
  data: readFileSync('test/sample1.flac')
})

์ปดํ“จํ„ฐ ๋น„์ „

์ด๋ฏธ์ง€ ๋ถ„๋ฅ˜

์ฃผ์–ด์ง„ ์ด๋ฏธ์ง€์— ๋ผ๋ฒจ์„ ํ• ๋‹นํ•˜๊ณ  ํ•ด๋‹น ๋ผ๋ฒจ์˜ ํ™•๋ฅ  ์ ์ˆ˜๋ฅผ ํ•จ๊ป˜ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค.

๋ฐ๋ชจ

await hf.imageClassification({
  data: readFileSync('test/cheetah.png'),
  model: 'google/vit-base-patch16-224'
})

๊ฐ์ฒด ๊ฐ์ง€

์ด๋ฏธ์ง€ ๋‚ด์˜ ๊ฐ์ฒด๋ฅผ ๊ฐ์ง€ํ•˜๊ณ , ํ•ด๋‹น ๊ฐ์ฒด์— ๋Œ€ํ•œ ๋ผ๋ฒจ, ๋ฐ”์šด๋”ฉ ๋ฐ•์Šค, ํ™•๋ฅ  ์ ์ˆ˜๋ฅผ ๋ฐ˜ํ™˜ํ•ฉ๋‹ˆ๋‹ค.

๋ฐ๋ชจ

await hf.objectDetection({
  data: readFileSync('test/cats.png'),
  model: 'facebook/detr-resnet-50'
})

์ด๋ฏธ์ง€ ๋ถ„ํ• 

์ด๋ฏธ์ง€ ๋‚ด ์„ธ๊ทธ๋จผํŠธ๋ฅผ ๊ฐ์ง€ํ•˜๊ณ , ํ•ด๋‹น ๋ฐ”์šด๋”ฉ ๋ฐ•์Šค ๋ฐ ํ™•๋ฅ  ์ ์ˆ˜์™€ ํ•จ๊ป˜ ๋ผ๋ฒจ์„ ๋ฐ˜ํ™˜ํ•ฉ๋‹ˆ๋‹ค.

await hf.imageSegmentation({
  data: readFileSync('test/cats.png'),
  model: 'facebook/detr-resnet-50-panoptic'
})

์ด๋ฏธ์ง€์—์„œ ํ…์ŠคํŠธ๋กœ

์ฃผ์–ด์ง„ ์ด๋ฏธ์ง€์—์„œ ํ…์ŠคํŠธ๋ฅผ ์ถœ๋ ฅํ•˜๋ฉฐ, ์บก์…”๋‹ ๋˜๋Š” ๊ด‘ํ•™ ๋ฌธ์ž ์ธ์‹์— ์ผ๋ฐ˜์ ์œผ๋กœ ์‚ฌ์šฉ๋ฉ๋‹ˆ๋‹ค.

await hf.imageToText({
  data: readFileSync('test/cats.png'),
  model: 'nlpconnect/vit-gpt2-image-captioning'
})

ํ…์ŠคํŠธ์—์„œ ์ด๋ฏธ์ง€

ํ…์ŠคํŠธ ํ”„๋กฌํ”„ํŠธ์—์„œ ์ด๋ฏธ์ง€๋ฅผ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค.

๋ฐ๋ชจ

await hf.textToImage({
  model: 'black-forest-labs/FLUX.1-dev',
  inputs: 'a picture of a green bird'
})

์ด๋ฏธ์ง€์—์„œ ์ด๋ฏธ์ง€๋กœ

Image-to-image๋Š” ์†Œ์Šค ์ด๋ฏธ์ง€๋ฅผ ๋Œ€์ƒ ์ด๋ฏธ์ง€ ๋˜๋Š” ๋Œ€์ƒ ์ด๋ฏธ์ง€ ๋„๋ฉ”์ธ์˜ ํŠน์„ฑ์— ๋งž๊ฒŒ ๋ณ€ํ™˜ํ•˜๋Š” ์ž‘์—…์ž…๋‹ˆ๋‹ค.

์ธํ„ฐ๋ž™ํ‹ฐ๋ธŒ ํŠœํ† ๋ฆฌ์–ผ

await hf.imageToImage({
  inputs: new Blob([readFileSync("test/stormtrooper_depth.png")]),
  parameters: {
    prompt: "elmo's lecture",
  },
  model: "lllyasviel/sd-controlnet-depth",
});

Zero Shot ์ด๋ฏธ์ง€ ๋ถ„๋ฅ˜

โ€ฆ

await hf.zeroShotImageClassification({
  model: 'openai/clip-vit-large-patch14-336',
  inputs: {
    image: await (await fetch('https://placekitten.com/300/300')).blob()
  },
  parameters: {
    candidate_labels: ['cat', 'dog']
  }
})

๋ฉ€ํ‹ฐ๋ชจ๋‹ฌ

์‹œ๊ฐ ์งˆ์˜์‘๋‹ต

Visual Question Answering์€ ์ด๋ฏธ์ง€๋ฅผ ๊ธฐ๋ฐ˜์œผ๋กœ ์—ด๋ฆฐ ํ˜•์‹์˜ ์งˆ๋ฌธ์— ๋‹ตํ•˜๋Š” ์ž‘์—…์ž…๋‹ˆ๋‹ค. ์ž์—ฐ์–ด ์งˆ๋ฌธ์— ๋Œ€ํ•ด ์ž์—ฐ์–ด ์‘๋‹ต์„ ์ถœ๋ ฅํ•ฉ๋‹ˆ๋‹ค.

๋ฐ๋ชจ

await hf.visualQuestionAnswering({
  model: 'dandelin/vilt-b32-finetuned-vqa',
  inputs: {
    question: 'How many cats are lying down?',
    image: await (await fetch('https://placekitten.com/300/300')).blob()
  }
})

๋ฌธ์„œ ์งˆ์˜์‘๋‹ต

Document question answering ๋ชจ๋ธ์€ (๋ฌธ์„œ, ์งˆ๋ฌธ) ์Œ์„ ์ž…๋ ฅ์œผ๋กœ ๋ฐ›์•„ ์ž์—ฐ์–ด ํ˜•์‹์˜ ๋‹ต๋ณ€์„ ๋ฐ˜ํ™˜ํ•ฉ๋‹ˆ๋‹ค.

๋ฐ๋ชจ

await hf.documentQuestionAnswering({
  model: 'impira/layoutlm-document-qa',
  inputs: {
    question: 'Invoice number?',
    image: await (await fetch('https://huggingface.co/spaces/impira/docquery/resolve/2359223c1837a7587402bda0f2643382a6eefeab/invoice.png')).blob(),
  }
})

ํ…Œ์ด๋ธ”

ํ‘œํ˜• ํšŒ๊ท€

Tabular regression๋Š” ์†์„ฑ ์ง‘ํ•ฉ์ด ์ฃผ์–ด์กŒ์„ ๋•Œ ์ˆ˜์น˜ ๊ฐ’์„ ์˜ˆ์ธกํ•˜๋Š” ์ž‘์—…์ž…๋‹ˆ๋‹ค.

await hf.tabularRegression({
  model: "scikit-learn/Fish-Weight",
  inputs: {
    data: {
      "Height": ["11.52", "12.48", "12.3778"],
      "Length1": ["23.2", "24", "23.9"],
      "Length2": ["25.4", "26.3", "26.5"],
      "Length3": ["30", "31.2", "31.1"],
      "Species": ["Bream", "Bream", "Bream"],
      "Width": ["4.02", "4.3056", "4.6961"]
    },
  },
})

ํ‘œํ˜• ๋ฐ์ดํ„ฐ ๋ถ„๋ฅ˜

Tabular classification์€ ์†์„ฑ ์ง‘ํ•ฉ์„ ๊ธฐ๋ฐ˜์œผ๋กœ ๋Œ€์ƒ ์นดํ…Œ๊ณ ๋ฆฌ(๊ทธ๋ฃน)๋ฅผ ๋ถ„๋ฅ˜ํ•˜๋Š” ์ž‘์—…์ž…๋‹ˆ๋‹ค.

await hf.tabularClassification({
  model: "vvmnnnkv/wine-quality",
  inputs: {
    data: {
      "fixed_acidity": ["7.4", "7.8", "10.3"],
      "volatile_acidity": ["0.7", "0.88", "0.32"],
      "citric_acid": ["0", "0", "0.45"],
      "residual_sugar": ["1.9", "2.6", "6.4"],
      "chlorides": ["0.076", "0.098", "0.073"],
      "free_sulfur_dioxide": ["11", "25", "5"],
      "total_sulfur_dioxide": ["34", "67", "13"],
      "density": ["0.9978", "0.9968", "0.9976"],
      "pH": ["3.51", "3.2", "3.23"],
      "sulphates": ["0.56", "0.68", "0.82"],
      "alcohol": ["9.4", "9.8", "12.6"]
    },
  },
})

chatCompletion ๋ฉ”์„œ๋“œ์™€ ํ˜ธํ™˜๋˜๋Š” Chat Completion API ์ œ๊ณต์ž๋ฅผ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

// Chat Completion Example
const MISTRAL_KEY = process.env.MISTRAL_KEY;
const hf = new InferenceClient(MISTRAL_KEY, {
  endpointUrl: "https://api.mistral.ai",
});
const stream = hf.chatCompletionStream({
  model: "mistral-tiny",
  messages: [{ role: "user", content: "Complete the equation one + one = , just the answer" }],
});
let out = "";
for await (const chunk of stream) {
  if (chunk.choices && chunk.choices.length > 0) {
    out += chunk.choices[0].delta.content;
    console.log(out);
  }
}

Inference Endpoints ์‚ฌ์šฉ

์œ„์—์„œ ์‚ดํŽด๋ณธ ์˜ˆ์ œ๋Š” ์ถ”๋ก  ์ œ๊ณต์ž(inference provider)๋ฅผ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค. ํ”„๋กœํ† ํƒ€์ดํ•‘ ๋ฐ ๋น ๋ฅธ ํ…Œ์ŠคํŠธ๋ฅผ ์œ„ํ•ด ๋งค์šฐ ์œ ์šฉํ•˜์ง€๋งŒ, ๋ชจ๋ธ์„ ํ”„๋กœ๋•์…˜ ํ™˜๊ฒฝ์— ๋ฐฐํฌํ•  ์ค€๋น„๊ฐ€ ๋˜๋ฉด ์ „์šฉ ์ธํ”„๋ผ๋ฅผ ์‚ฌ์šฉํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. ์ด๋•Œ Inference Endpoints๊ฐ€ ํ™œ์šฉ๋ฉ๋‹ˆ๋‹ค. ์ด๋ฅผ ํ†ตํ•ด ์–ด๋–ค ๋ชจ๋ธ์ด๋“  ๋ฐฐํฌํ•˜๊ณ  ์ด๋ฅผ ๋น„๊ณต๊ฐœ API๋กœ ๋…ธ์ถœํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ๋ฐฐํฌ๊ฐ€ ์™„๋ฃŒ๋˜๋ฉด ์—ฐ๊ฒฐํ•  ์ˆ˜ ์žˆ๋Š” URL์„ ๋ฐ›๊ฒŒ ๋ฉ๋‹ˆ๋‹ค:

import { InferenceClient } from '@huggingface/inference';

const hf = new InferenceClient("hf_xxxxxxxxxxxxxx", {
	endpointUrl: "https://j3z5luu0ooo76jnl.us-east-1.aws.endpoints.huggingface.cloud/v1/",
});

const response = await hf.chatCompletion({
	messages: [
		{
			role: "user",
			content: "What is the capital of France?",
		},
	],
});

console.log(response.choices[0].message.content);

๊ธฐ๋ณธ์ ์œผ๋กœ ์ถ”๋ก  ์—”๋“œํฌ์ธํŠธ์— ๋Œ€ํ•œ ๋ชจ๋“  ํ˜ธ์ถœ์€ ๋ชจ๋ธ์ด ๋กœ๋“œ๋  ๋•Œ๊นŒ์ง€ ๋Œ€๊ธฐํ•ฉ๋‹ˆ๋‹ค. ์—”๋“œํฌ์ธํŠธ์—์„œ 0์œผ๋กœ ์Šค์ผ€์ผ๋ง์ด ํ™œ์„ฑํ™”๋˜์–ด ์žˆ์œผ๋ฉด ์ƒ๋‹นํ•œ ๋Œ€๊ธฐ ์‹œ๊ฐ„์ด ๋ฐœ์ƒํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์ด ๋™์ž‘์„ ๋น„ํ™œ์„ฑํ™”ํ•˜๊ณ  ์—”๋“œํฌ์ธํŠธ๊ฐ€ ๋ฐ˜ํ™˜ํ•˜๋Š” 500 HTTP ์˜ค๋ฅ˜๋ฅผ ์ง์ ‘ ์ฒ˜๋ฆฌํ•˜๋ ค๋ฉด ๋‹ค์Œ๊ณผ ๊ฐ™์ด ์„ค์ •ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค:

const hf = new InferenceClient("hf_xxxxxxxxxxxxxx", {
	endpointUrl: "https://j3z5luu0ooo76jnl.us-east-1.aws.endpoints.huggingface.cloud/v1/",
});

const response = await hf.chatCompletion(
	{
		messages: [
			{
				role: "user",
				content: "What is the capital of France?",
			},
		],
	},
	{
		retry_on_error: false,
	}
);

๋กœ์ปฌ ์—”๋“œํฌ์ธํŠธ ์‚ฌ์šฉ

InferenceClient๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์ž์ฒด ๋จธ์‹ ์—์„œ ์‹คํ–‰ ์ค‘์ธ ๋กœ์ปฌ ์ถ”๋ก  ์„œ๋ฒ„(llama.cpp, vllm, litellm server, TGI, mlx ๋“ฑ)๋กœ ์ฑ„ํŒ… ์™„์„ฑ์„ ์ˆ˜ํ–‰ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. API๋Š” OpenAI API์™€ ํ˜ธํ™˜๋˜์–ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

import { InferenceClient } from '@huggingface/inference';

const hf = new InferenceClient(undefined, {
	endpointUrl: "http://localhost:8080",
});

const response = await hf.chatCompletion({
	messages: [
		{
			role: "user",
			content: "What is the capital of France?",
		},
	],
});

console.log(response.choices[0].message.content);

OpenAI JS ํด๋ผ์ด์–ธํŠธ์™€ ๋งˆ์ฐฌ๊ฐ€์ง€๋กœ, InferenceClient๋Š” OpenAI REST API ํ˜ธํ™˜ ์—”๋“œํฌ์ธํŠธ์—์„œ Chat Completion ์ถ”๋ก ์„ ์‹คํ–‰ํ•˜๋Š” ๋ฐ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

ํ…Œ์ŠคํŠธ ์‹คํ–‰

HF_TOKEN="your access token" pnpm run test

์ ํ•ฉํ•œ ๋ชจ๋ธ ์ฐพ๊ธฐ

๊ฐ ํƒœ์Šคํฌ๋ณ„๋กœ ์‚ฌ์šฉ ๊ฐ€๋Šฅํ•œ ๋ชจ๋ธ์„ ๋‚˜์—ดํ•˜๊ณ  ๊ฐ ํƒœ์Šคํฌ๊ฐ€ ์–ด๋–ป๊ฒŒ ์ž‘๋™ํ•˜๋Š”์ง€ ์ž์„ธํžˆ ์„ค๋ช…ํ•˜๋Š” Tasks๋ผ๋Š” ์œ ์šฉํ•œ ๋ฌธ์„œ ํ”„๋กœ์ ํŠธ๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค.

ML ์ธก๋ฉด์„ ๋” ๊นŠ์ด ํŒŒ๊ณ ๋“ค๊ณ ์ž ํ•˜์‹œ๋Š” ๊ฒฝ์šฐ๋ฅผ ์œ„ํ•ด ๋ฐ๋ชจ, ์˜ˆ์‹œ ์ถœ๋ ฅ ๋ฐ ๊ธฐํƒ€ ๋ฆฌ์†Œ์Šค๋„ ํฌํ•จ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค.

์˜์กด์„ฑ

  • @huggingface/tasks : ํƒ€์ž… ์ •์˜๋งŒ ํฌํ•จ
Update on GitHub