huggingface / huggingface.js

Utilities to use the Hugging Face Hub API

Home Page:https://hf.co/docs/huggingface.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Inference] Expose metadata

SBrandeis opened this issue · comments

The Inference API exposes some metadata about the inference computation via HTTP headers,
mainly:

  • x-compute-time
  • x-compute-type

Along with some task-specific info such as x-compute-characters for text-generation

It would be great to expose that metadata through the HfInference client. It will be especially useful when we integrate the inference client in widgets (#360 )