Nvidia에서 TensorRT(TRT)와 Triton Inference Server(TRTIS)에 대해 워크샵을 진행한 내용이 있어서 정리하고자 한다(워크샵 영상 및 자료 링크)(TRT Quickstart Github) 0. Introduction 모델 학습이 끝난 이후, 실제 production 환경에서 모델을 서빙할 때 필요한 부분들은 학습할 때와는 다르다. 가장 간단한 방식은 .predict()/.forward()를 실행하는 것이다. 하지만 더 속도와 TPS를 고민하고 더 좋은 방식이 없을지 생각하다 보면 다음과 같은 질문들이 떠오를 수 있다. Is there something more we can do with our model now that we don’t need to train anymo..
port를 사용하고 있는 pid를 찾고 싶을 때가 있다. 이때 사용할 수 있는 명령어는 ss, netset, lsof가 있다. $ sudo ss -lptn 'sport = :80' State Local Address:Port Peer Address:Port LISTEN 127.0.0.1:80 *:* users:(("nginx",pid=125004,fd=12)) LISTEN ::1:80 :::* users:(("nginx",pid=125004,fd=11)) $ sudo netstat -nlp | grep :80 tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 125004/nginx $ sudo lsof -n -i :80 | grep LISTEN nginx 125004 nginx 3u IPv..
우분투에서 ps -ef | grep python으로 실행중인 프로세스를 찾으면 아래와 같이 뜬다. user@user-System-Product-Name:~/user$ ps -ef | grep python user 5821 1 1 May16 ? 06:26:54 python -u hello.py 이때 실행중인 파일의 경로를 pid로 찾기 위해서는 다음과 같은 방법들이 있다. 1) pwdx pwdx 로 찾으면 다음과 같이 뜬다. user@user-System-Product-Name:~/user$ pwdx 5821 5821: /home/user 2) lsof lsof -p | grep cwd로 찾으면 다음과 같이 뜬다. user@user-System-Product-Name:~/user$ lsof -p 5821 ..
최근에 Docker 버전이 24으로 업데이트 된 후 아래와 같은 에러메세지가 뜨면서 실행이 안되는 문제가 발생하였다. Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? 아래와 같은 과정으로 해결하였다. 1. Docker 서비스 종료 아래 명령어로 docker 서비스를 모두 종료한다. sudo systemctl stop docker sudo systemctl stop docker.socket sudo systemctl stop containerd 2. daemon.json 파일 확인 cat /etc/docker/daemon.json으로 파일 내용을 확인해보면 다음과 같이 되어있었다...
David Silver 교수님의 강의 내용을 정리하고자 한다(링크). 0. Introduction In the last lecture we approximated the value or action-value function using parameter $\theta$. Then policy was generated directly from the value function(e.g. $\epsilon$-greedy) $$\begin{array}{rcl} V_{\theta} & \approx &V^{\pi}(s) \\ Q_{\theta}(s,a) & \approx & Q^{\pi}(s,a) \end{array}$$ In this lecture we will directly parametrize the po..
David Silver 교수님의 강의 내용을 정리하고자 한다(링크). 0. Introduction RL은 아래와 같이 굉장히 큰 크기의 문제들을 풀 수 있다. Backgammon: $10^{20}$ states Computer Go: $10^{170}$ states Helicopter: continuous state space 5장에서 배웠던 model-free 환경에서의 prediction, control 문제들에 대해 scale up 할 수 있는 방법을 이번 장에서 배울 것이다. *So far we, we have represented valu function by a lookup table. Every state $s$ has an entry $V(s)$ Or every state-action pa..
David Silver 교수님의 강의 내용을 정리하고자 한다(링크). 현재 배우고 있는 내용의 흐름은 다음과 같다. 4장 Model-Free prediction: Estimate the value of an unknown MDP(Policy Evaluation) 5장 Model-Free control: Optimize the value function of an unkown MDP(환경이 주어지지 않았을 때 어떻게 reward를 최대로 하는 방향으로 모델을 학습시킬 것인가) MDP로 모델링 될 수 있는 문제들은 Elevator, Robocup Soccer, Ship Steering, Helicoper, Game of Go, Robot walking, Protein Folding등으로 다양하다. 이 문제들..
David Silver 교수님의 강의 내용을 정리하고자 한다(링크). 현재 배우고 있는 내용의 흐름은 다음과 같다. 3장 Planning by DP: known MDP를 푸는 방법(find optimal behavior of MDP that maximizes the amount of rewards agent can expect to get from any state of environment) 4장 Model-Free prediction: Estimate the value of an unknown MDP(Policy Evaluation) 5장 Model-Free control: Optimize the value function of an unkown MDP 1. Monte-Carlo Reinforceme..
sysstat을 사용해서 cpu, ram 사용량 변화를 기록해둘 수 있는 방법을 정리하고자 한다. 1. sysstat 설치 apt-get install sysstat 이후 /etc/default/sysstat 파일을 열어 ENABLED="true"로 설정하고 ctrl+X → y → Enter를 눌러 파일을 저장하고 sysstat을 재시작해준다. nano /etc/default/sysstat service sysstat restart 2. sysstat으로 사용량 기록하기 sar 공식문서를 참고하면 다양한 방식으로 시스템 사용량을 확인할 수 있다. (1) CPU 사용량 # cpu 사용량을 2초마다 사람이 읽기 편한 형태로 5번 기록 sar -p 2 5 --human (2) RAM 사용량 # ram 사용량을..
GPT계열 LLM 모델의 zero-shot 성능을 높인 방법인 instruction-tuning에 대한 논문 내용을 정리하고자 한다(논문링크). 1. Introduction GPT3와 같은 모델들은 few-shot 성능이 (기대보다)뛰어나다는 특징이 있는 반면, zero-shot에 대해서는 성능이 낮다. FLAN은 자연어 instruction과 one-shot example을 데이터셋으로 구성하여 fine-tuning 시켜(Instruction Tuning) unseen task에 대한 zero-sho 성능을 높인 연구이다. FLAN 연구의 intuition은 다음과 같다. LM(Language Model)에 주어지는 입력인 zero-shot prompt(no few-shot example)은 실제 모델..