목록Data Engineer/triton inference server (13)
취미가 좋다
triton model analyzer는 performance analyzer를 사용하여 모델에 요청을 보내는 툴이다. model analyzer는 batching 과 instance configureation 에 따라, 모델이 요구하는 gpu 메모리를 특화하는데 유용하다. gpu 메모리 사용 정보를 가지고 있으면, gpu 메모리가 좀 남았을 때, multiple 모델을 같은 gpu에 어떻게 올릴 것인지 더 잘 결정할 수 있다. The Triton Model Analyzer is a tool that uses Performance Analyzer to send requests to your model while measuring GPU memory and compute utilization. The Mo..
https://github.com/triton-inference-server/backend/blob/main/README.md Triton Inference Server Backend triton backend 는 모델을 실행하는 implemnetation이다. 다양한 종류의 deep learning framework (pytorch, tensorflow, tensorRT, ONNX runtime...) 으로 감싸질 수도 있다. 혹은 backend는 여러 operation (image 전처리) 를 수행하는 custom C/C++ logic 이 될 수도 있다. FAQ Where can I ask general questions about Triton and Triton backends? Where can ..
Triton Server Trace triton은 각 inference 요청에 대해 자세한 trace를 생성할 수 있다. 실행 가능한 tritonserver를 실행시킬 때, 아래의 arguments를 지정해주면 된다. $ tritonserver --trace-file=/tmp/trace.json --trace-rate=100 --trace-level=MAX ... --trace-file : trace output이 저장될 위치를 가리킨다. --trace-rate : 샘플링 주기를 가리킨다. --trace-level : trace 정보를 얼마나 자세하게 모을지에 대한 수준이다. --help : 더 자세한 옵션 정보를 볼 수 있다. JSON Trace Output trace output으로 생성되는 JSON..
https://github.com/triton-inference-server/server/blob/main/docs/perf_analyzer.md Performance Analyzer 모델의 inference 성능을 최적화하는데 중요한 점은, 최적화 전략을 달리해서 실험할 때, 성능의 변화를 측정할 수 있는 지의 여부이다. perf_analyzer application은 triton 서버에서 이 작업을 수행한다. perf_analyzer 어플리케이션은 inference 요청을 생성하여 모델에 보내고, throughput 과 latency를 측정한다. representative results를 얻기 위해, 값이 안정화될 때까지 반복해서 측정한다. 기본적으로 안정을 결정하는데 평균 latency를 사용하지만..
Metrics GPU 와 request 통계를 나타내는 Prometheus metrics 를 제공한다. 일반적으로 http://localhost:8002/metrics 를 통해 접근한다. metrics는 endpoint를 통해서만 접근이 가능하고, 어떤 원격 서버에도 보내지지 않는다. 메트릭 포맷이 plain text라서, 아래의 코드를 통해 직접 볼 수도 있다. $ curl localhost:8002/metrics tritonserver --allow-metrics=false 옵션을 사용하여 메트릭을 비활성화 할 수 있다. --allow-gpu-metrics=false 옵션으로 gpu 메트릭만 비활성화 할 수 있다. --metrics-port 옵션으로 다른 포트를 선택할 수도 있다. 아래의 표가 메트릭..
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/qX2aa/btq7YqdqId2/MQuzzpJOo1yjbV1KaGPk60/img.jpg)
https://github.com/triton-inference-server/server/blob/main/docs/architecture.md Triton Architecture 아래의 사진은 Triton Inference Server의 high-level architecture를 보여준다. Model Repository 는 triton이 추론을 하는 기반이 된다. Inference requests 는 HTTP/REST or gRPC or C API 를 통해 서버에 도착하고, 각 모델의 스케줄러로 보내진다. triton은 모델별로 multiple scheduling, batching algorithms 이 구현한다. 각 모델 스케줄러는 요청에 대한 batching을 수행하고, 모델에 맞는 백엔드로 요청..