text-generation-inference 文档

使用统计数据收集

Hugging Face's logo
加入 Hugging Face 社区

并获得增强的文档体验

开始使用

使用统计数据收集

文本生成推理收集匿名使用统计数据,以帮助我们改进服务。收集到的数据用于改进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"
  }
}

如何选择退出

通过向text-generation-launcher传递--usage-stats,您可以控制收集的使用统计数据量。--usage-stats=no-stack将不会发出错误的堆栈跟踪和错误类型,但将继续发送启动和停止事件。--usage-stats=off将完全禁用所有功能。

< > 在 GitHub 上更新