Text Generation Inference 文件

使用統計數據收集

Hugging Face's logo
加入 Hugging Face 社群

並獲得增強的文件體驗

開始使用

使用統計數據收集

Text Generation Inference 會收集匿名使用統計數據,以協助我們改善服務。收集到的數據將用於優化 TGI 並了解錯誤發生的原因。數據是在透明的情況下收集的,且會省略任何敏感資訊。

使用統計數據僅會在 TGI 於 Docker 容器中執行時收集。這能避免當 TGI 直接在主機上執行時進行數據收集。收集的數據包括啟動與關閉事件,以及每 15 分鐘發送一次的「心跳」訊號。

收集哪些數據

用於收集數據的程式碼可於此處查閱。截至 2.1.2 版本,以下是所收集數據的範例:

  • 來自 TGI 設定
{
  "event_type": "start",
  "disable_grammar_support": false,
  "max_batch_prefill_tokens": 4096,
  "max_batch_size": null,
  "max_batch_total_tokens": null,
  "max_best_of": 2,
  "max_client_batch_size": 4,
  "max_concurrent_requests": 128,
  "max_input_tokens": 1024,
  "max_stop_sequences": 4,
  "max_top_n_tokens": 5,
  "max_total_tokens": 2048,
  "max_waiting_tokens": 20,
  "model_config": {
    "model_type": "Bloom"
  },
  "revision": null,
  "tokenizer_class": "BloomTokenizerFast",
  "validation_workers": 2,
  "waiting_served_ratio": 1.2,
  "docker_label": "latest",
  "git_sha": "cfc118704880453d29bcbe4fbbd91dda501cf5fe",
  "nvidia_env": {
    "name": "NVIDIA A10G",
    "pci_bus_id": "00000000:00:1E.0",
    "driver_version": "535.183.01",
    "pstate": "P8",
    "pcie_link_gen_max": "4",
    "pcie_link_gen_current": "1",
    "temperature_gpu": "31",
    "utilization_gpu": "0 %",
    "utilization_memory": "0 %",
    "memory_total": "23028 MiB",
    "memory_free": "22515 MiB",
    "memory_used": "0 MiB",
    "reset_status_reset_required": "No",
    "reset_status_drain_and_reset_recommended": "No",
    "compute_cap": "8.6",
    "ecc_errors_corrected_volatile_total": "0",
    "mig_mode_current": "[N/A]",
    "power_draw_instant": "10.86 W",
    "power_limit": "300.00 W"
  },
  "system_env": {
    "cpu_count": 16,
    "cpu_type": "AMD EPYC 7R32",
    "total_memory": 66681196544,
    "architecture": "x86_64",
    "platform": "linux-unix-x86_64"
  }
}

如何選擇退出

透過將 --usage-stats 參數傳遞給 text-generation-launcher,您可以控制使用統計數據的收集程度。--usage-stats=no-stack 將不會發送錯誤的堆疊追蹤(stack traces)與錯誤類型,但仍會發送啟動與停止事件;--usage-stats=off 則會完全停用所有收集功能。

在 GitHub 上更新

© . This site is unofficial and not affiliated with Hugging Face, Inc.