embeded/Cortex-M3 STM2026. 9. 4. 10:30

composite는 별도 소스를 넣어야지 cubeMX를 통해서 지원하지 않은것 같고

report id 쪽은 좀더 봐야 알 것 같은데

얘도 cubeMX로 하는건 아닌것 같은 느낌이..

 

[링크 : https://controllerstech.com/stm32-usb-hid-mouse-and-keyboard-combined/] report id 이용

[링크 : https://controllerstech.com/stm32-usb-composite-class-cdc-hid/] 복합클래스

    [링크 : https://controllerstech.com/stm32-usb-hid-mouse-keyboard/]

 

 

Posted by 구차니
embeded/Cortex-M3 STM2026. 8. 31. 18:23

동료직원 괴롭혀서 실장!

R1_1에 10k가 없었는데 하나 달았다.

 

PB5 에 SW가 있고

 

 

uint8_t CDC_Transmit_FS(uint8_t* Buf, uint16_t Len);
void USB_CDC_RxHandler(uint8_t* Buf, uint32_t Len)
{
  for(int idx = 0; idx < Len;idx++)
  if(Buf[idx] == 0x0D) Buf[idx] = 0x0A;
CDC_Transmit_FS(Buf, Len);
}


#define BUF_SIZE 50
uint8_t usb_buf[BUF_SIZE];
uint32_t count = 0;

char prev_gpio = 0;
void gpio_proc()
{
  char curr_gpio = 0;
  GPIO_PinState gpios[3];
  curr_gpio |= (gpios[0] = HAL_GPIO_ReadPin(GPIOB, GPIO_PIN_3));
  curr_gpio |= (gpios[1] = HAL_GPIO_ReadPin(GPIOB, GPIO_PIN_4)) << 1;
  curr_gpio |= (gpios[2] = HAL_GPIO_ReadPin(GPIOB, GPIO_PIN_5)) << 2;

  char lut[4] = {0, 1, 3, 2};

  if(prev_gpio != curr_gpio)
  {
    char isCW = 0;
    char prev = lut[prev_gpio & 0x03];
    char curr = lut[curr_gpio & 0x03];
    if((prev  + 1) % 4 == curr)
    { isCW = 1; }

    sprintf((char*)usb_buf, "%ld %d %d %s, %d %s\r\n", count, gpios[1], gpios[0], isCW?"CW":"CCW",
     gpios[2], gpios[2]?"rel":"push");
    CDC_Transmit_FS(usb_buf, BUF_SIZE);
    memset(usb_buf,0,BUF_SIZE);
    count++;

    prev_gpio = curr_gpio;
  }
}

 

풀업되어있다가 누르면 떨어지는거라

1이면 안누른거

0이면 누른걸로 인식된다.

35 1 0 CW, 1 rel
36 0 0 CW, 1 rel
37 0 1 CW, 1 rel
38 1 1 CW, 1 rel
39 1 0 CW, 1 rel
40 0 0 CW, 1 rel
41 0 1 CW, 1 rel
42 1 1 CW, 1 rel
43 0 1 CCW, 1 rel
44 0 0 CCW, 1 rel
45 1 0 CCW, 1 rel
46 1 1 CCW, 1 rel
47 0 1 CCW, 1 rel
48 0 0 CCW, 1 rel
49 1 0 CCW, 1 rel
50 1 1 CCW, 1 rel
51 0 1 CCW, 1 rel
52 0 0 CCW, 1 rel
53 0 0 CCW, 0 push
54 0 0 CCW, 1 rel

 

도대체 왜! 이거 부품이 안달려 있는거야?!

Posted by 구차니
embeded/Cortex-M3 STM2026. 8. 28. 12:40

오래되서 기억도 안나네 ㅋㅋ

PB5 - SW (스위치) <- 먼가 오작동.  + 쪽 3V3과 연결되지 않고 따로 전원 연결해줘야 하는 듯.

PB4 - CLK (로터리)

PB3 - DT (로터리)

귀찮아서 USB CDC 를 통해서 출력하게 함.

#define BUF_SIZE 50
uint8_t usb_buf[BUF_SIZE];
uint32_t count = 0;
int prev_gpio = 0;
void gpio_proc()
{
  int curr_gpio = 0;
  GPIO_PinState gpios[3];
  curr_gpio |= (gpios[0] = HAL_GPIO_ReadPin(GPIOB, GPIO_PIN_3));
  curr_gpio |= (gpios[1] = HAL_GPIO_ReadPin(GPIOB, GPIO_PIN_4)) << 1;
  curr_gpio |= (gpios[2] = HAL_GPIO_ReadPin(GPIOB, GPIO_PIN_5)) << 2;

  if(prev_gpio != curr_gpio)
  {
    sprintf((char*)usb_buf, "%ld %d %d %d\r\n", count, gpios[2], gpios[1], gpios[0]);
    CDC_Transmit_FS(usb_buf, BUF_SIZE);
    memset(usb_buf,0,BUF_SIZE);
    count++;

    prev_gpio = curr_gpio;
  }
}

 

시계방향 회전. 두 번 딱딱 걸리고 다시 0 0 0  으로 돌아온다.

[2026-08-28 12:20:17.496] 1897 0 0 0                                            
[2026-08-28 12:20:20.417] 1898 0 0 1                                            
[2026-08-28 12:20:20.469] 1899 0 1 1                                            
[2026-08-28 12:20:20.735] 1900 0 1 0                                            
[2026-08-28 12:20:20.767] 1901 0 0 0

 

반시계방향 회전

[2026-08-28 12:20:20.767] 1901 0 0 0                                            
[2026-08-28 12:20:21.906] 1902 0 1 0                                            
[2026-08-28 12:20:21.959] 1903 0 1 1                                            
[2026-08-28 12:20:22.202] 1904 0 0 1                                            
[2026-08-28 12:20:22.233] 1905 0 0 0  

 

정방향 0 - 1 - 3 - 2 - 0 으로

역방향 0 - 2 - 3 - 1 - 0 으로

표현되긴한데.. gray code 같기도 하고?

[링크 : https://woodforest.tistory.com/147]

 

그래서 저 값을 가지고 판단을 하면 이제 CW 방향인지 CCW 방향인지 판단이 가능해진다.

char prev_gpio = 0;
void gpio_proc()
{
  char curr_gpio = 0;
  GPIO_PinState gpios[3];
  curr_gpio |= (gpios[0] = HAL_GPIO_ReadPin(GPIOB, GPIO_PIN_3));
  curr_gpio |= (gpios[1] = HAL_GPIO_ReadPin(GPIOB, GPIO_PIN_4)) << 1;
  // curr_gpio |= (gpios[2] = HAL_GPIO_ReadPin(GPIOB, GPIO_PIN_5)) << 2;

  char lut[4] = {0, 1, 3, 2};

  if(prev_gpio != curr_gpio)
  {
    char isCW = 0;
    char prev = lut[prev_gpio];
    char curr = lut[curr_gpio];
    if((prev  + 1) % 4 == curr)
    { isCW = 1; }

    sprintf((char*)usb_buf, "%ld %d %d %s\r\n", count, gpios[1], gpios[0], isCW?"CW":"CCW");
    CDC_Transmit_FS(usb_buf, BUF_SIZE);
    memset(usb_buf,0,BUF_SIZE);
    count++;

    prev_gpio = curr_gpio;
  }
}

 

테스트 끝!

[2026-08-28 12:33:57.522] 0 0 1 CW                                              
[2026-08-28 12:33:57.555] 1 1 1 CW                                              

[2026-08-28 12:33:58.521] 2 1 0 CW                                              
[2026-08-28 12:33:58.553] 3 0 0 CW                                              

[2026-08-28 12:33:59.452] 4 1 0 CCW                                             
[2026-08-28 12:33:59.496] 5 1 1 CCW                                             

[2026-08-28 12:34:00.156] 6 1 0 CW                                              
[2026-08-28 12:34:00.178] 7 0 0 CW                                              

[2026-08-28 12:34:00.729] 8 1 0 CCW // 반시계 방향 한번 돌리기
[2026-08-28 12:34:00.779] 9 1 1 CCW                                             

[2026-08-28 12:34:04.895] 10 0 1 CCW // 드륵 느낌이 안나게 반시계 방향으로 천천히 돌림

[2026-08-28 12:34:06.098] 11 1 1 CW    // 드륵 느낌이 날때까지 시계 방향으로 돌림

[2026-08-28 12:34:07.518] 12 0 1 CCW  // 드륵 느낌이 안나게 반시계 방향으로 천천히 돌림

[2026-08-28 12:34:08.590] 13 1 1 CW  // 드륵 느낌이 날때까지 시계 방향으로 돌림

[2026-08-28 12:34:09.858] 14 0 1 CCW                                            
[2026-08-28 12:34:09.916] 15 0 0 CCW                                            

[2026-08-28 12:34:11.124] 16 1 0 CCW                                            
[2026-08-28 12:34:11.154] 17 1 1 CCW                                            

[2026-08-28 12:34:12.087] 18 1 0 CW                                             
[2026-08-28 12:34:12.127] 19 0 0 CW                                             

[2026-08-28 12:34:12.444] 20 0 1 CW                                             
[2026-08-28 12:34:12.476] 21 1 1 CW                                             

[2026-08-28 12:34:12.673] 22 1 0 CW                                             
[2026-08-28 12:34:12.693] 23 0 0 CW                                             

[2026-08-28 12:34:12.746] 24 0 1 CW                                             
[2026-08-28 12:34:12.778] 25 1 1 CW                                             

[2026-08-28 12:34:12.913] 26 1 0 CW  

 

역시 딴짓은 시원한 에어컨과

회사 전기와, 월급을 받으면서 딴짓을 해야 잘됨 ㅋㅋㅋ

'embeded > Cortex-M3 STM' 카테고리의 다른 글

stm32 usb composite / report id  (0) 2026.09.04
로터리 엔코더.. 2?  (0) 2026.08.31
stm32 port 전체 한번에 출력 변경하기  (0) 2026.06.22
stm32 uart data bit  (0) 2026.03.17
stm32 다른 영역으로 점프(부트로더)  (0) 2026.03.06
Posted by 구차니
embeded/esp322026. 8. 27. 17:11

이게 리비전이 다른가 모양이 다른게 있네

버전에 따라 USB-C 커넥터에 연결된 포트가 완전 다르니 주의가 필요할 듯.

내가 하나 얻은건 레딧의 것과 동일한 디자인이고

사진 기준 오른쪽 USB-C (USB OTG)

$ sudo dmesg
[108206.360152] usb 1-2: new full-speed USB device number 12 using xhci_hcd
[108206.487718] usb 1-2: New USB device found, idVendor=303a, idProduct=1001, bcdDevice= 1.01
[108206.487738] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[108206.487745] usb 1-2: Product: USB JTAG/serial debug unit
[108206.487750] usb 1-2: Manufacturer: Espressif
[108206.487756] usb 1-2: SerialNumber: 98:A3:16:E3:50:EC
[108206.492137] cdc_acm 1-2:1.0: ttyACM0: USB ACM device

$ lsusb
Bus 001 Device 021: ID 303a:1001 Espressif USB JTAG/serial debug unit 

 

사진 기준 왼쪽 USB-C (TTL to UART)

$ sudo dmesg
[108220.479842] usb 1-2: USB disconnect, device number 12
[108221.700959] usb 1-2: new full-speed USB device number 13 using xhci_hcd
[108221.829581] usb 1-2: New USB device found, idVendor=1a86, idProduct=55d3, bcdDevice= 4.45
[108221.829604] usb 1-2: New USB device strings: Mfr=0, Product=2, SerialNumber=3
[108221.829614] usb 1-2: Product: USB Single Serial
[108221.829621] usb 1-2: SerialNumber: 5A46054847
[108221.834111] cdc_acm 1-2:1.0: ttyACM0: USB ACM device

$ lsusb
Bus 001 Device 020: ID 1a86:55d3 QinHeng Electronics USB Single Serial

 

 

 

[링크 : https://www.reddit.com/r/esp32/comments/1gewov4/how_do_2_usbc_ports_relate_to_power_supply/?tl=ko]

[링크 : https://www.devicemart.co.kr/goods/view?no=14585830]

 

이걸 기반으로 작동하는걸려냐?

[링크 : https://github.com/espressif/esp-usb/tree/master/host/class/uvc/usb_host_uvc]

'embeded > esp32' 카테고리의 다른 글

esp32 s3 n16r8 / n9r2  (0) 2026.08.26
esp32cam 영상인식  (0) 2026.05.24
platform.io + vscode + esp32  (0) 2026.02.18
esp32 on arduino ide  (0) 2026.02.18
esp component 와 idf.py create-project-from-example  (0) 2026.02.10
Posted by 구차니
embeded/esp322026. 8. 26. 16:12

n00r0 에서

n은 Flash 용량(MB 단위)

r은 PSRAM 용량(MB 단위)

[링크 : https://www.etei.com/comparison/esp32-s3-wroom-1-n16r8_esp32-s3-wroom-1u-n8r2]

 

일단.. stm32f4 계열 보단 싸지만 얘도 싸지는 않고..

그 와중에 가격 차이 왜이래 오히려 역전?

[링크 : https://itempage3.auction.co.kr/DetailView.aspx?itemno=F455981092]

'embeded > esp32' 카테고리의 다른 글

esp32-s3 / n16r8  (0) 2026.08.27
esp32cam 영상인식  (0) 2026.05.24
platform.io + vscode + esp32  (0) 2026.02.18
esp32 on arduino ide  (0) 2026.02.18
esp component 와 idf.py create-project-from-example  (0) 2026.02.10
Posted by 구차니
embeded/jetson2026. 7. 30. 19:55

해볼까 하는데 될까 모르겠다

 

[링크 : https://huggingface.co/nvidia/Wan2.2-T2V-A14B-Diffusers-NVFP4]

'embeded > jetson' 카테고리의 다른 글

nvidia jetson agx thor / vLLM 시도  (0) 2026.07.28
nvidia jetson agx thor / mig  (0) 2026.07.27
nvidia jetson agx thor / 디버그 usb  (0) 2026.07.27
nvidia-smi mig  (0) 2026.07.26
nvidia jetson agx thor dev kit 설치 - USB boot  (0) 2026.07.24
Posted by 구차니
embeded/jetson2026. 7. 28. 11:32

 

2026.07.28에 하니 model 경로가 달라진듯 하다.

/root/.cache/huggingface 라고 명시되어 있더니, /data/models/huggingface 로 가버림

$ docker run --pull=always --rm -it \
  --network host \
  --shm-size=16g \
  --ulimit memlock=-1 \
  --ulimit stack=67108864 \
  --runtime=nvidia \
  --name=vllm_gemma4 \
  -v $HOME/data/models/huggingface:/data/models/huggingface \
  ghcr.io/nvidia-ai-iot/vllm:gemma4-jetson-thor \
  vllm serve google/gemma-4-E4B-it \
  --gpu-memory-utilization 0.5 \
  --enable-auto-tool-choice \
  --tool-call-parser hermes

 

$ docker run --pull=always --rm -it \
  --network host \
  --shm-size=16g \
  --ulimit memlock=-1 \
  --ulimit stack=67108864 \
  --runtime=nvidia \
  --name=vllm \
  -v $HOME/data/models/huggingface:/data/models/huggingface \
  ghcr.io/nvidia-ai-iot/vllm:latest-jetson-thor \
  vllm serve Qwen/Qwen3.6-35B-A3B \
  --enable-auto-tool-choice \
  --tool-call-parser hermes

 

----

 

 

저거 정도는 좀 찐하게 칠해주던가 -_ㅠ

한참 받고 했는데 안되서 멘붕왔다가 클로드 물어보니 orin 이자너! 외쳐주심 ㅋㅋ

인간이 미안해 ㅋㅋㅋㅋ

docker run -d \
  --network=host \
  -v ${HOME}/open-webui:/app/backend/data \
  -e OPENAI_API_BASE_URL=http://0.0.0.0:8000/v1 \
  --name open-webui \
  ghcr.io/open-webui/open-webui:main

docker run --pull=always --rm -it \
  --network host \
  --shm-size=16g \
  --ulimit memlock=-1 \
  --ulimit stack=67108864 \
  --runtime=nvidia \
  --name=vllm \
  -v $HOME/data/models/huggingface:/root/.cache/huggingface \
  ghcr.io/nvidia-ai-iot/vllm:latest-jetson-thor \
  vllm serve RedHatAI/Qwen3-8B-quantized.w4a16

[링크 : https://www.jetson-ai-lab.com/tutorials/genai-on-jetson-llms-vlms/#-vllm-for-best-performance]

 

vllm server 뒤에는 huggingface의 url을 때려 박으면 되나보다

양자화 차이는 있지만 그러면.. vllm server Qwen/Qwen3.5-0.8B 해봐야겠네

[링크 : https://huggingface.co/Qwen/Qwen3.5-0.8B]

 

open webui 에서 이런 에러가 발생해서 추가!

Qwen/Qwen3.5-0.8B
"auto" tool choice requires --enable-auto-tool-choice and --tool-call-parser to be set

 

잘 돌아는 가는데..

nvidia@nvidia:~$ docker run --pull=always --rm -it \
  --network host \
  --shm-size=16g \
  --ulimit memlock=-1 \
  --ulimit stack=67108864 \
  --runtime=nvidia \
  --name=vllm \
  -v $HOME/data/models/huggingface:/root/.cache/huggingface \
  ghcr.io/nvidia-ai-iot/vllm:latest-jetson-thor \
  vllm serve Qwen/Qwen3.5-0.8B \
  --enable-auto-tool-choice \
  --tool-call-parser hermes
latest-jetson-thor: Pulling from nvidia-ai-iot/vllm
Digest: sha256:b587dd56b4cb076209ad5156a626ac75f5a976d0e8e7d1e6a9fccd56d1bd65e8
Status: Image is up to date for ghcr.io/nvidia-ai-iot/vllm:latest-jetson-thor
/opt/venv/lib/python3.12/site-packages/transformers/utils/hub.py:110: FutureWarning: Using `TRANSFORMERS_CACHE` is deprecated and will be removed in v5 of Transformers. Use `HF_HOME` instead.
  warnings.warn(
(APIServer pid=1) INFO 07-28 03:09:00 [utils.py:299] 
(APIServer pid=1) INFO 07-28 03:09:00 [utils.py:299]        █     █     █▄   ▄█
(APIServer pid=1) INFO 07-28 03:09:00 [utils.py:299]  ▄▄ ▄█ █     █     █ ▀▄▀ █  version 0.19.0
(APIServer pid=1) INFO 07-28 03:09:00 [utils.py:299]   █▄█▀ █     █     █     █  model   Qwen/Qwen3.5-0.8B
(APIServer pid=1) INFO 07-28 03:09:00 [utils.py:299]    ▀▀  ▀▀▀▀▀ ▀▀▀▀▀ ▀     ▀
(APIServer pid=1) INFO 07-28 03:09:00 [utils.py:299] 
(APIServer pid=1) INFO 07-28 03:09:00 [utils.py:233] non-default args: {'model_tag': 'Qwen/Qwen3.5-0.8B', 'enable_auto_tool_choice': True, 'tool_call_parser': 'hermes', 'model': 'Qwen/Qwen3.5-0.8B'}
config.json: 2.91kB [00:00, 16.0MB/s]

 

llama.cpp 처럼 한번 문장 물어 본것에 대한 속도가 안나와서 비교하기가 애매~하다.

(APIServer pid=1) INFO 07-28 03:16:02 [loggers.py:259] Engine 000: Avg prompt throughput: 647.4 tokens/s, Avg generation throughput: 7.5 tokens/s, Running: 1 reqs, Waiting: 0 reqs, GPU KV cache usage: 0.0%, Prefix cache hit rate: 0.0%
(APIServer pid=1) INFO:     127.0.0.1:56010 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO:     127.0.0.1:56016 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO 07-28 03:16:12 [loggers.py:259] Engine 000: Avg prompt throughput: 20.4 tokens/s, Avg generation throughput: 3.3 tokens/s, Running: 0 reqs, Waiting: 0 reqs, GPU KV cache usage: 0.0%, Prefix cache hit rate: 0.0%
(APIServer pid=1) INFO:     127.0.0.1:37160 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO:     127.0.0.1:37160 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO:     127.0.0.1:37162 - "GET /v1/models HTTP/1.1" 200 OK
(APIServer pid=1) INFO 07-28 03:16:22 [loggers.py:259] Engine 000: Avg prompt throughput: 643.2 tokens/s, Avg generation throughput: 36.1 tokens/s, Running: 0 reqs, Waiting: 0 reqs, GPU KV cache usage: 0.0%, Prefix cache hit rate: 0.0%
(APIServer pid=1) INFO:     127.0.0.1:54470 - "GET /v1/models HTTP/1.1" 200 OK
(APIServer pid=1) INFO 07-28 03:16:32 [loggers.py:259] Engine 000: Avg prompt throughput: 0.0 tokens/s, Avg generation throughput: 0.0 tokens/s, Running: 0 reqs, Waiting: 0 reqs, GPU KV cache usage: 0.0%, Prefix cache hit rate: 0.0%
(APIServer pid=1) INFO:     192.168.40.209:36304 - "GET /metrics HTTP/1.1" 200 OK
(APIServer pid=1) INFO:     192.168.40.209:36304 - "GET /favicon.ico HTTP/1.1" 404 Not Found
(APIServer pid=1) INFO:     127.0.0.1:53220 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO:     127.0.0.1:53220 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO 07-28 03:19:12 [loggers.py:259] Engine 000: Avg prompt throughput: 666.3 tokens/s, Avg generation throughput: 18.3 tokens/s, Running: 0 reqs, Waiting: 0 reqs, GPU KV cache usage: 0.0%, Prefix cache hit rate: 0.0%
(APIServer pid=1) INFO 07-28 03:19:22 [loggers.py:259] Engine 000: Avg prompt throughput: 0.0 tokens/s, Avg generation throughput: 0.0 tokens/s, Running: 0 reqs, Waiting: 0 reqs, GPU KV cache usage: 0.0%, Prefix cache hit rate: 0.0%
(APIServer pid=1) INFO:     127.0.0.1:57598 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO 07-28 03:19:32 [loggers.py:259] Engine 000: Avg prompt throughput: 622.3 tokens/s, Avg generation throughput: 39.0 tokens/s, Running: 1 reqs, Waiting: 0 reqs, GPU KV cache usage: 0.1%, Prefix cache hit rate: 0.0%
(APIServer pid=1) INFO:     127.0.0.1:57598 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO 07-28 03:19:42 [loggers.py:259] Engine 000: Avg prompt throughput: 91.0 tokens/s, Avg generation throughput: 7.9 tokens/s, Running: 0 reqs, Waiting: 0 reqs, GPU KV cache usage: 0.0%, Prefix cache hit rate: 0.0%
(APIServer pid=1) INFO 07-28 03:19:52 [loggers.py:259] Engine 000: Avg prompt throughput: 0.0 tokens/s, Avg generation throughput: 0.0 tokens/s, Running: 0 reqs, Waiting: 0 reqs, GPU KV cache usage: 0.0%, Prefix cache hit rate: 0.0%
(APIServer pid=1) INFO:     127.0.0.1:56452 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO:     127.0.0.1:56450 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO:     127.0.0.1:56450 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO:     127.0.0.1:56452 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO 07-28 03:20:52 [loggers.py:259] Engine 000: Avg prompt throughput: 668.1 tokens/s, Avg generation throughput: 14.8 tokens/s, Running: 0 reqs, Waiting: 0 reqs, GPU KV cache usage: 0.0%, Prefix cache hit rate: 0.0%
(APIServer pid=1) INFO:     127.0.0.1:51276 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO 07-28 03:21:02 [loggers.py:259] Engine 000: Avg prompt throughput: 597.2 tokens/s, Avg generation throughput: 25.3 tokens/s, Running: 1 reqs, Waiting: 0 reqs, GPU KV cache usage: 0.1%, Prefix cache hit rate: 0.0%
(APIServer pid=1) INFO:     127.0.0.1:51276 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO 07-28 03:21:12 [loggers.py:259] Engine 000: Avg prompt throughput: 112.8 tokens/s, Avg generation throughput: 71.5 tokens/s, Running: 0 reqs, Waiting: 0 reqs, GPU KV cache usage: 0.0%, Prefix cache hit rate: 0.0%
(APIServer pid=1) INFO 07-28 03:21:22 [loggers.py:259] Engine 000: Avg prompt throughput: 0.0 tokens/s, Avg generation throughput: 0.0 tokens/s, Running: 0 reqs, Waiting: 0 reqs, GPU KV cache usage: 0.0%, Prefix cache hit rate: 0.0%
(APIServer pid=1) INFO:     127.0.0.1:43142 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO 07-28 03:21:32 [loggers.py:259] Engine 000: Avg prompt throughput: 686.0 tokens/s, Avg generation throughput: 28.5 tokens/s, Running: 1 reqs, Waiting: 0 reqs, GPU KV cache usage: 0.1%, Prefix cache hit rate: 0.0%
(APIServer pid=1) INFO 07-28 03:21:42 [loggers.py:259] Engine 000: Avg prompt throughput: 0.0 tokens/s, Avg generation throughput: 132.8 tokens/s, Running: 1 reqs, Waiting: 0 reqs, GPU KV cache usage: 0.1%, Prefix cache hit rate: 0.0%
(APIServer pid=1) INFO 07-28 03:21:52 [loggers.py:259] Engine 000: Avg prompt throughput: 0.0 tokens/s, Avg generation throughput: 127.6 tokens/s, Running: 0 reqs, Waiting: 0 reqs, GPU KV cache usage: 0.0%, Prefix cache hit rate: 0.0%
(APIServer pid=1) INFO:     127.0.0.1:40238 - "GET /v1/models HTTP/1.1" 200 OK
(APIServer pid=1) INFO:     127.0.0.1:40254 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO:     127.0.0.1:40254 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO 07-28 03:22:02 [loggers.py:259] Engine 000: Avg prompt throughput: 1424.5 tokens/s, Avg generation throughput: 56.6 tokens/s, Running: 0 reqs, Waiting: 0 reqs, GPU KV cache usage: 0.0%, Prefix cache hit rate: 0.0%
(APIServer pid=1) INFO:     127.0.0.1:52062 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO:     127.0.0.1:52062 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO 07-28 03:22:12 [loggers.py:259] Engine 000: Avg prompt throughput: 1407.0 tokens/s, Avg generation throughput: 26.6 tokens/s, Running: 0 reqs, Waiting: 0 reqs, GPU KV cache usage: 0.0%, Prefix cache hit rate: 0.0%
(APIServer pid=1) INFO:     127.0.0.1:38124 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO:     127.0.0.1:38124 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO 07-28 03:22:22 [loggers.py:259] Engine 000: Avg prompt throughput: 1139.7 tokens/s, Avg generation throughput: 24.9 tokens/s, Running: 0 reqs, Waiting: 0 reqs, GPU KV cache usage: 0.0%, Prefix cache hit rate: 0.0%
(APIServer pid=1) INFO:     127.0.0.1:38124 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO 07-28 03:22:32 [loggers.py:259] Engine 000: Avg prompt throughput: 1053.3 tokens/s, Avg generation throughput: 110.4 tokens/s, Running: 1 reqs, Waiting: 0 reqs, GPU KV cache usage: 0.1%, Prefix cache hit rate: 0.0%
(APIServer pid=1) INFO:     127.0.0.1:40160 - "GET /v1/models HTTP/1.1" 200 OK
(APIServer pid=1) INFO:     127.0.0.1:40174 - "GET /v1/models HTTP/1.1" 200 OK
(APIServer pid=1) INFO 07-28 03:22:42 [loggers.py:259] Engine 000: Avg prompt throughput: 0.0 tokens/s, Avg generation throughput: 129.2 tokens/s, Running: 1 reqs, Waiting: 0 reqs, GPU KV cache usage: 0.2%, Prefix cache hit rate: 0.0%
(APIServer pid=1) INFO:     127.0.0.1:37106 - "GET /v1/models HTTP/1.1" 200 OK
(APIServer pid=1) INFO:     127.0.0.1:38124 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO:     127.0.0.1:37108 - "GET /v1/models HTTP/1.1" 200 OK
(APIServer pid=1) INFO:     127.0.0.1:38124 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO 07-28 03:22:52 [loggers.py:259] Engine 000: Avg prompt throughput: 1634.7 tokens/s, Avg generation throughput: 59.5 tokens/s, Running: 1 reqs, Waiting: 0 reqs, GPU KV cache usage: 0.2%, Prefix cache hit rate: 0.0%
(APIServer pid=1) INFO 07-28 03:23:02 [loggers.py:259] Engine 000: Avg prompt throughput: 0.0 tokens/s, Avg generation throughput: 127.9 tokens/s, Running: 1 reqs, Waiting: 0 reqs, GPU KV cache usage: 0.2%, Prefix cache hit rate: 0.0%
(APIServer pid=1) INFO:     127.0.0.1:38124 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO 07-28 03:23:12 [loggers.py:259] Engine 000: Avg prompt throughput: 535.5 tokens/s, Avg generation throughput: 116.7 tokens/s, Running: 0 reqs, Waiting: 0 reqs, GPU KV cache usage: 0.0%, Prefix cache hit rate: 0.0%
(APIServer pid=1) INFO 07-28 03:23:22 [loggers.py:259] Engine 000: Avg prompt throughput: 0.0 tokens/s, Avg generation throughput: 0.0 tokens/s, Running: 0 reqs, Waiting: 0 reqs, GPU KV cache usage: 0.0%, Prefix cache hit rate: 0.0%
(APIServer pid=1) INFO:     127.0.0.1:49210 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO 07-28 03:26:32 [loggers.py:259] Engine 000: Avg prompt throughput: 1562.3 tokens/s, Avg generation throughput: 111.9 tokens/s, Running: 1 reqs, Waiting: 0 reqs, GPU KV cache usage: 0.2%, Prefix cache hit rate: 0.0%
(APIServer pid=1) INFO 07-28 03:26:42 [loggers.py:259] Engine 000: Avg prompt throughput: 743.5 tokens/s, Avg generation throughput: 121.6 tokens/s, Running: 1 reqs, Waiting: 0 reqs, GPU KV cache usage: 0.1%, Prefix cache hit rate: 0.0%
(APIServer pid=1) INFO:     127.0.0.1:54226 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO:     127.0.0.1:49210 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO:     127.0.0.1:54226 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO:     127.0.0.1:49210 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO 07-28 03:26:52 [loggers.py:259] Engine 000: Avg prompt throughput: 4021.5 tokens/s, Avg generation throughput: 92.3 tokens/s, Running: 1 reqs, Waiting: 0 reqs, GPU KV cache usage: 0.2%, Prefix cache hit rate: 0.0%
(APIServer pid=1) INFO 07-28 03:27:02 [loggers.py:259] Engine 000: Avg prompt throughput: 369.0 tokens/s, Avg generation throughput: 122.5 tokens/s, Running: 1 reqs, Waiting: 0 reqs, GPU KV cache usage: 0.1%, Prefix cache hit rate: 0.0%
(APIServer pid=1) INFO:     127.0.0.1:49210 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO:     127.0.0.1:49210 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO 07-28 03:27:12 [loggers.py:259] Engine 000: Avg prompt throughput: 1909.2 tokens/s, Avg generation throughput: 71.0 tokens/s, Running: 1 reqs, Waiting: 0 reqs, GPU KV cache usage: 0.2%, Prefix cache hit rate: 0.0%
(APIServer pid=1) INFO 07-28 03:27:22 [loggers.py:259] Engine 000: Avg prompt throughput: 331.3 tokens/s, Avg generation throughput: 120.5 tokens/s, Running: 1 reqs, Waiting: 0 reqs, GPU KV cache usage: 0.1%, Prefix cache hit rate: 0.0%
(APIServer pid=1) INFO:     127.0.0.1:49210 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO:     127.0.0.1:49210 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO 07-28 03:27:32 [loggers.py:259] Engine 000: Avg prompt throughput: 2077.2 tokens/s, Avg generation throughput: 91.2 tokens/s, Running: 1 reqs, Waiting: 0 reqs, GPU KV cache usage: 0.3%, Prefix cache hit rate: 0.0%
(APIServer pid=1) INFO 07-28 03:27:42 [loggers.py:259] Engine 000: Avg prompt throughput: 0.0 tokens/s, Avg generation throughput: 121.8 tokens/s, Running: 1 reqs, Waiting: 0 reqs, GPU KV cache usage: 0.3%, Prefix cache hit rate: 0.0%
(APIServer pid=1) INFO:     127.0.0.1:42812 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO:     127.0.0.1:49210 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO 07-28 03:27:52 [loggers.py:259] Engine 000: Avg prompt throughput: 2832.4 tokens/s, Avg generation throughput: 110.3 tokens/s, Running: 1 reqs, Waiting: 0 reqs, GPU KV cache usage: 0.3%, Prefix cache hit rate: 0.0%
(APIServer pid=1) INFO:     127.0.0.1:56048 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO:     127.0.0.1:42812 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO 07-28 03:28:02 [loggers.py:259] Engine 000: Avg prompt throughput: 3328.9 tokens/s, Avg generation throughput: 132.0 tokens/s, Running: 1 reqs, Waiting: 0 reqs, GPU KV cache usage: 0.1%, Prefix cache hit rate: 0.0%
(APIServer pid=1) INFO:     127.0.0.1:42812 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO 07-28 03:28:12 [loggers.py:259] Engine 000: Avg prompt throughput: 0.0 tokens/s, Avg generation throughput: 12.5 tokens/s, Running: 0 reqs, Waiting: 0 reqs, GPU KV cache usage: 0.0%, Prefix cache hit rate: 0.0%
(APIServer pid=1) INFO 07-28 03:28:22 [loggers.py:259] Engine 000: Avg prompt throughput: 0.0 tokens/s, Avg generation throughput: 0.0 tokens/s, Running: 0 reqs, Waiting: 0 reqs, GPU KV cache usage: 0.0%, Prefix cache hit rate: 0.0%
(APIServer pid=1) INFO:     127.0.0.1:43420 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO:     127.0.0.1:43406 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO 07-28 03:28:42 [loggers.py:259] Engine 000: Avg prompt throughput: 628.9 tokens/s, Avg generation throughput: 25.9 tokens/s, Running: 1 reqs, Waiting: 0 reqs, GPU KV cache usage: 0.1%, Prefix cache hit rate: 0.0%
(APIServer pid=1) INFO:     127.0.0.1:43406 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO:     127.0.0.1:43420 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO:     127.0.0.1:43406 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO 07-28 03:28:52 [loggers.py:259] Engine 000: Avg prompt throughput: 764.8 tokens/s, Avg generation throughput: 85.0 tokens/s, Running: 1 reqs, Waiting: 0 reqs, GPU KV cache usage: 0.1%, Prefix cache hit rate: 0.0%
(APIServer pid=1) INFO 07-28 03:29:02 [loggers.py:259] Engine 000: Avg prompt throughput: 0.0 tokens/s, Avg generation throughput: 132.9 tokens/s, Running: 1 reqs, Waiting: 0 reqs, GPU KV cache usage: 0.1%, Prefix cache hit rate: 0.0%
(APIServer pid=1) INFO:     127.0.0.1:43406 - "POST /v1/chat/completions HTTP/1.1" 200 OK

 

llama.cpp 에서는 120 넘기기도 쉽지 않았는데 vLLM이 조금더 성능이 잘 나오긴 하는건가?

약.. 10% 정도?

[ Prompt: 93.1 t/s | Generation: 122.7 t/s ]
[ Prompt: 138.6 t/s | Generation: 100.3 t/s ]
[ Prompt: 264.0 t/s | Generation: 119.6 t/s ]
[ Prompt: 1654.8 t/s | Generation: 122.1 t/s ]
[ Prompt: 1379.7 t/s | Generation: 119.8 t/s ]
[ Prompt: 2284.5 t/s | Generation: 117.7 t/s ]
[ Prompt: 2549.1 t/s | Generation: 112.2 t/s ]
[ Prompt: 1214.4 t/s | Generation: 111.4 t/s ]
[ Prompt: 803.1 t/s | Generation: 115.3 t/s ]

 

+

gemma를 시도하려고 했는데 에러남. qwen은 되더니 쳇

nvidia@nvidia:~$ docker run --pull=always --rm -it   --network host   --shm-size=16g   --ulimit memlock=-1   --ulimit stack=67108864   --runtime=nvidia   --name=vllm   -v $HOME/data/models/huggingface:/root/.cache/huggingface   ghcr.io/nvidia-ai-iot/vllm:latest-jetson-thor   vllm serve google/gemma-4-31B-it 

nvidia@nvidia:~$ docker run --pull=always --rm -it   --network host   --shm-size=16g   --ulimit memlock=-1   --ulimit stack=67108864   --runtime=nvidia   --name=vllm   -v $HOME/data/models/huggingface:/root/.cache/huggingface   ghcr.io/nvidia-ai-iot/vllm:latest-jetson-thor   vllm serve google/gemma-4-E4B-it
latest-jetson-thor: Pulling from nvidia-ai-iot/vllm
Digest: sha256:b587dd56b4cb076209ad5156a626ac75f5a976d0e8e7d1e6a9fccd56d1bd65e8
Status: Image is up to date for ghcr.io/nvidia-ai-iot/vllm:latest-jetson-thor
/opt/venv/lib/python3.12/site-packages/transformers/utils/hub.py:110: FutureWarning: Using `TRANSFORMERS_CACHE` is deprecated and will be removed in v5 of Transformers. Use `HF_HOME` instead.
  warnings.warn(
(APIServer pid=1) INFO 07-28 03:40:47 [utils.py:299] 
(APIServer pid=1) INFO 07-28 03:40:47 [utils.py:299]        █     █     █▄   ▄█
(APIServer pid=1) INFO 07-28 03:40:47 [utils.py:299]  ▄▄ ▄█ █     █     █ ▀▄▀ █  version 0.19.0
(APIServer pid=1) INFO 07-28 03:40:47 [utils.py:299]   █▄█▀ █     █     █     █  model   google/gemma-4-E4B-it
(APIServer pid=1) INFO 07-28 03:40:47 [utils.py:299]    ▀▀  ▀▀▀▀▀ ▀▀▀▀▀ ▀     ▀
(APIServer pid=1) INFO 07-28 03:40:47 [utils.py:299] 
(APIServer pid=1) INFO 07-28 03:40:47 [utils.py:233] non-default args: {'model_tag': 'google/gemma-4-E4B-it', 'model': 'google/gemma-4-E4B-it'}
config.json: 5.14kB [00:00, 18.5MB/s]
(APIServer pid=1) Traceback (most recent call last):
(APIServer pid=1)   File "/opt/venv/bin/vllm", line 10, in <module>
(APIServer pid=1)     sys.exit(main())
(APIServer pid=1)              ^^^^^^
(APIServer pid=1)   File "/opt/venv/lib/python3.12/site-packages/vllm/entrypoints/cli/main.py", line 75, in main
(APIServer pid=1)     args.dispatch_function(args)
(APIServer pid=1)   File "/opt/venv/lib/python3.12/site-packages/vllm/entrypoints/cli/serve.py", line 122, in cmd
(APIServer pid=1)     uvloop.run(run_server(args))
(APIServer pid=1)   File "/opt/venv/lib/python3.12/site-packages/uvloop/__init__.py", line 96, in run
(APIServer pid=1)     return __asyncio.run(
(APIServer pid=1)            ^^^^^^^^^^^^^^
(APIServer pid=1)   File "/root/.local/share/uv/python/cpython-3.12.13-linux-aarch64-gnu/lib/python3.12/asyncio/runners.py", line 195, in run
(APIServer pid=1)     return runner.run(main)
(APIServer pid=1)            ^^^^^^^^^^^^^^^^
(APIServer pid=1)   File "/root/.local/share/uv/python/cpython-3.12.13-linux-aarch64-gnu/lib/python3.12/asyncio/runners.py", line 118, in run
(APIServer pid=1)     return self._loop.run_until_complete(task)
(APIServer pid=1)            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(APIServer pid=1)   File "uvloop/loop.pyx", line 1518, in uvloop.loop.Loop.run_until_complete
(APIServer pid=1)   File "/opt/venv/lib/python3.12/site-packages/uvloop/__init__.py", line 48, in wrapper
(APIServer pid=1)     return await main
(APIServer pid=1)            ^^^^^^^^^^
(APIServer pid=1)   File "/opt/venv/lib/python3.12/site-packages/vllm/entrypoints/openai/api_server.py", line 670, in run_server
(APIServer pid=1)     await run_server_worker(listen_address, sock, args, **uvicorn_kwargs)
(APIServer pid=1)   File "/opt/venv/lib/python3.12/site-packages/vllm/entrypoints/openai/api_server.py", line 684, in run_server_worker
(APIServer pid=1)     async with build_async_engine_client(
(APIServer pid=1)                ^^^^^^^^^^^^^^^^^^^^^^^^^^
(APIServer pid=1)   File "/root/.local/share/uv/python/cpython-3.12.13-linux-aarch64-gnu/lib/python3.12/contextlib.py", line 210, in __aenter__
(APIServer pid=1)     return await anext(self.gen)
(APIServer pid=1)            ^^^^^^^^^^^^^^^^^^^^^
(APIServer pid=1)   File "/opt/venv/lib/python3.12/site-packages/vllm/entrypoints/openai/api_server.py", line 100, in build_async_engine_client
(APIServer pid=1)     async with build_async_engine_client_from_engine_args(
(APIServer pid=1)                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(APIServer pid=1)   File "/root/.local/share/uv/python/cpython-3.12.13-linux-aarch64-gnu/lib/python3.12/contextlib.py", line 210, in __aenter__
(APIServer pid=1)     return await anext(self.gen)
(APIServer pid=1)            ^^^^^^^^^^^^^^^^^^^^^
(APIServer pid=1)   File "/opt/venv/lib/python3.12/site-packages/vllm/entrypoints/openai/api_server.py", line 124, in build_async_engine_client_from_engine_args
(APIServer pid=1)     vllm_config = engine_args.create_engine_config(usage_context=usage_context)
(APIServer pid=1)                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(APIServer pid=1)   File "/opt/venv/lib/python3.12/site-packages/vllm/engine/arg_utils.py", line 1549, in create_engine_config
(APIServer pid=1)     model_config = self.create_model_config()
(APIServer pid=1)                    ^^^^^^^^^^^^^^^^^^^^^^^^^^
(APIServer pid=1)   File "/opt/venv/lib/python3.12/site-packages/vllm/engine/arg_utils.py", line 1398, in create_model_config
(APIServer pid=1)     return ModelConfig(
(APIServer pid=1)            ^^^^^^^^^^^^
(APIServer pid=1)   File "/opt/venv/lib/python3.12/site-packages/pydantic/_internal/_dataclasses.py", line 121, in __init__
(APIServer pid=1)     s.__pydantic_validator__.validate_python(ArgsKwargs(args, kwargs), self_instance=s)
(APIServer pid=1) pydantic_core._pydantic_core.ValidationError: 1 validation error for ModelConfig
(APIServer pid=1)   Value error, The checkpoint you are trying to load has model type `gemma4` but Transformers does not recognize this architecture. This could be because of an issue with the checkpoint, or because your version of Transformers is out of date.
(APIServer pid=1) 
(APIServer pid=1) You can update Transformers with the command `pip install --upgrade transformers`. If this does not work, and the checkpoint is very new, then there may not be a release version that supports this model yet. In this case, you can get the most up-to-date code by installing Transformers from source with the command `pip install git+https://github.com/huggingface/transformers.git` [type=value_error, input_value=ArgsKwargs((), {'model': ...nderer_num_workers': 1}), input_type=ArgsKwargs]
(APIServer pid=1)     For further information visit https://errors.pydantic.dev/2.12/v/value_error

 

아무튼 thor용 gemma4를 받아서 해봐야지 머

docker pull ghcr.io/nvidia-ai-iot/vllm:gemma4-jetson-thor

[링크 : https://github.com/orgs/nvidia-ai-iot/packages/container/vllm/784603821?tag=gemma4-jetson-thor]

 

받는지 티가 안나서 일단 hf_token 추가해줬는데 로그 상으로는 차이가 별로 없다.(한 줄?)

btop 해서 보니 열심히 다운로드 받는 중.

nvidia@nvidia:~$ docker run --pull=always --rm -it   --network host   --shm-size=16g   --ulimit memlock=-1   --ulimit stack=67108864   --runtime=nvidia   --name=vllm_gemma4   -v $HOME/data/models/huggingface:/root/.cache/huggingface   ghcr.io/nvidia-ai-iot/vllm:gemma4-jetson-thor   vllm serve google/gemma-4-E4B-it
gemma4-jetson-thor: Pulling from nvidia-ai-iot/vllm
Digest: sha256:570f9a5ffa89a772226abcc98c2d358a56ec3f755c97bc079c7f2396ffe62260
Status: Image is up to date for ghcr.io/nvidia-ai-iot/vllm:gemma4-jetson-thor
(APIServer pid=1) INFO 07-28 04:38:44 [utils.py:299] 
(APIServer pid=1) INFO 07-28 04:38:44 [utils.py:299]        █     █     █▄   ▄█
(APIServer pid=1) INFO 07-28 04:38:44 [utils.py:299]  ▄▄ ▄█ █     █     █ ▀▄▀ █  version 0.19.0
(APIServer pid=1) INFO 07-28 04:38:44 [utils.py:299]   █▄█▀ █     █     █     █  model   google/gemma-4-E4B-it
(APIServer pid=1) INFO 07-28 04:38:44 [utils.py:299]    ▀▀  ▀▀▀▀▀ ▀▀▀▀▀ ▀     ▀
(APIServer pid=1) INFO 07-28 04:38:44 [utils.py:299] 
(APIServer pid=1) INFO 07-28 04:38:44 [utils.py:233] non-default args: {'model_tag': 'google/gemma-4-E4B-it', 'model': 'google/gemma-4-E4B-it'}
(APIServer pid=1) Warning: You are sending unauthenticated requests to the HF Hub. Please set a HF_TOKEN to enable higher rate limits and faster downloads.
config.json: 5.14kB [00:00, 12.9MB/s]
processor_config.json: 1.69kB [00:00, 4.13MB/s]
(APIServer pid=1) INFO 07-28 04:38:54 [model.py:549] Resolved architecture: Gemma4ForConditionalGeneration
(APIServer pid=1) INFO 07-28 04:38:54 [model.py:1678] Using max model len 131072
(APIServer pid=1) INFO 07-28 04:38:54 [config.py:104] Gemma4 model has heterogeneous head dimensions (head_dim=256, global_head_dim=512). Forcing TRITON_ATTN backend to prevent mixed-backend numerical divergence.
(APIServer pid=1) INFO 07-28 04:38:54 [vllm.py:790] Asynchronous scheduling is enabled.
tokenizer_config.json: 3.08kB [00:00, 8.20MB/s]
tokenizer.json: 100%|███████████████████████████████████████████████████████████████████████████████████████████████| 32.2M/32.2M [00:05<00:00, 5.53MB/s]
chat_template.jinja: 18.6kB [00:00, 26.0MB/s]
generation_config.json: 100%|████████████████████████████████████████████████████████████████████████████████████████████| 208/208 [00:00<00:00, 809kB/s]
(EngineCore pid=128) INFO 07-28 04:40:14 [core.py:105] Initializing a V1 LLM engine (v0.19.0) with config: model='google/gemma-4-E4B-it', speculative_config=None, tokenizer='google/gemma-4-E4B-it', skip_tokenizer_init=False, tokenizer_mode=auto, revision=None, tokenizer_revision=None, trust_remote_code=False, dtype=torch.bfloat16, max_seq_len=131072, download_dir=None, load_format=auto, tensor_parallel_size=1, pipeline_parallel_size=1, data_parallel_size=1, decode_context_parallel_size=1, dcp_comm_backend=ag_rs, disable_custom_all_reduce=False, quantization=None, enforce_eager=False, enable_return_routed_experts=False, kv_cache_dtype=auto, device_config=cuda, structured_outputs_config=StructuredOutputsConfig(backend='auto', disable_any_whitespace=False, disable_additional_properties=False, reasoning_parser='', reasoning_parser_plugin='', enable_in_reasoning=False), observability_config=ObservabilityConfig(show_hidden_metrics_for_version=None, otlp_traces_endpoint=None, collect_detailed_traces=None, kv_cache_metrics=False, kv_cache_metrics_sample=0.01, cudagraph_metrics=False, enable_layerwise_nvtx_tracing=False, enable_mfu_metrics=False, enable_mm_processor_stats=False, enable_logging_iteration_details=False), seed=0, served_model_name=google/gemma-4-E4B-it, enable_prefix_caching=True, enable_chunked_prefill=True, pooler_config=None, compilation_config={'mode': <CompilationMode.VLLM_COMPILE: 3>, 'debug_dump_path': None, 'cache_dir': '', 'compile_cache_save_format': 'binary', 'backend': 'inductor', 'custom_ops': ['none'], 'splitting_ops': ['vllm::unified_attention', 'vllm::unified_attention_with_output', 'vllm::unified_mla_attention', 'vllm::unified_mla_attention_with_output', 'vllm::mamba_mixer2', 'vllm::mamba_mixer', 'vllm::short_conv', 'vllm::linear_attention', 'vllm::plamo2_mamba_mixer', 'vllm::gdn_attention_core', 'vllm::olmo_hybrid_gdn_full_forward', 'vllm::kda_attention', 'vllm::sparse_attn_indexer', 'vllm::rocm_aiter_sparse_attn_indexer', 'vllm::unified_kv_cache_update', 'vllm::unified_mla_kv_cache_update'], 'compile_mm_encoder': False, 'cudagraph_mm_encoder': False, 'encoder_cudagraph_token_budgets': [], 'encoder_cudagraph_max_images_per_batch': 0, 'compile_sizes': [], 'compile_ranges_endpoints': [2048], 'inductor_compile_config': {'enable_auto_functionalized_v2': False, 'size_asserts': False, 'alignment_asserts': False, 'scalar_asserts': False, 'combo_kernels': True, 'benchmark_combo_kernel': True}, 'inductor_passes': {}, 'cudagraph_mode': <CUDAGraphMode.FULL_AND_PIECEWISE: (2, 1)>, 'cudagraph_num_of_warmups': 1, 'cudagraph_capture_sizes': [1, 2, 4, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120, 128, 136, 144, 152, 160, 168, 176, 184, 192, 200, 208, 216, 224, 232, 240, 248, 256, 272, 288, 304, 320, 336, 352, 368, 384, 400, 416, 432, 448, 464, 480, 496, 512], 'cudagraph_copy_inputs': False, 'cudagraph_specialize_lora': True, 'use_inductor_graph_partition': False, 'pass_config': {'fuse_norm_quant': False, 'fuse_act_quant': False, 'fuse_attn_quant': False, 'enable_sp': False, 'fuse_gemm_comms': False, 'fuse_allreduce_rms': False}, 'max_cudagraph_capture_size': 512, 'dynamic_shapes_config': {'type': <DynamicShapesType.BACKED: 'backed'>, 'evaluate_guards': False, 'assume_32_bit_indexing': False}, 'local_cache_dir': None, 'fast_moe_cold_start': True, 'static_all_moe_layers': []}
(EngineCore pid=128) Warning: You are sending unauthenticated requests to the HF Hub. Please set a HF_TOKEN to enable higher rate limits and faster downloads.
(EngineCore pid=128) INFO 07-28 04:40:20 [parallel_state.py:1400] world_size=1 rank=0 local_rank=0 distributed_init_method=tcp://192.168.40.202:38135 backend=nccl
(EngineCore pid=128) INFO 07-28 04:40:20 [parallel_state.py:1716] rank 0 in world size 1 is assigned as DP rank 0, PP rank 0, PCP rank 0, TP rank 0, EP rank N/A, EPLB rank N/A
(EngineCore pid=128) INFO 07-28 04:40:42 [gpu_model_runner.py:4735] Starting to load model google/gemma-4-E4B-it...
(EngineCore pid=128) INFO 07-28 04:40:42 [vllm.py:790] Asynchronous scheduling is enabled.
(EngineCore pid=128) INFO 07-28 04:40:42 [cuda.py:274] Using AttentionBackendEnum.TRITON_ATTN backend.
(EngineCore pid=128) INFO 07-28 04:40:43 [cuda.py:274] Using AttentionBackendEnum.TRITON_ATTN backend.

 

gemma4-e4b-it-q4_k_m 이 40t/s 정도 나왔는데 반해, vLLM 에서는 오히려 저조하게 나오는 듯 하다.

(APIServer pid=1) INFO 07-28 05:50:55 [loggers.py:259] Engine 000: Avg prompt throughput: 273.3 tokens/s, Avg generation throughput: 2.4 tokens/s, Running: 2 reqs, Waiting: 0 reqs, GPU KV cache usage: 0.3%, Prefix cache hit rate: 47.3%
(APIServer pid=1) INFO:     127.0.0.1:53598 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO:     127.0.0.1:53598 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO:     127.0.0.1:47762 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO 07-28 05:51:05 [loggers.py:259] Engine 000: Avg prompt throughput: 52.8 tokens/s, Avg generation throughput: 32.0 tokens/s, Running: 2 reqs, Waiting: 0 reqs, GPU KV cache usage: 0.3%, Prefix cache hit rate: 63.2%
(APIServer pid=1) INFO:     127.0.0.1:53600 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO 07-28 05:51:15 [loggers.py:259] Engine 000: Avg prompt throughput: 0.0 tokens/s, Avg generation throughput: 30.5 tokens/s, Running: 1 reqs, Waiting: 0 reqs, GPU KV cache usage: 0.3%, Prefix cache hit rate: 63.2%
(APIServer pid=1) INFO 07-28 05:51:25 [loggers.py:259] Engine 000: Avg prompt throughput: 0.0 tokens/s, Avg generation throughput: 24.0 tokens/s, Running: 1 reqs, Waiting: 0 reqs, GPU KV cache usage: 0.3%, Prefix cache hit rate: 63.2%
(APIServer pid=1) INFO:     127.0.0.1:57762 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO:     127.0.0.1:47762 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO:     127.0.0.1:57762 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO:     127.0.0.1:47762 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO 07-28 05:51:35 [loggers.py:259] Engine 000: Avg prompt throughput: 154.2 tokens/s, Avg generation throughput: 40.7 tokens/s, Running: 1 reqs, Waiting: 0 reqs, GPU KV cache usage: 0.3%, Prefix cache hit rate: 75.0%
(APIServer pid=1) INFO 07-28 05:51:45 [loggers.py:259] Engine 000: Avg prompt throughput: 0.0 tokens/s, Avg generation throughput: 24.0 tokens/s, Running: 1 reqs, Waiting: 0 reqs, GPU KV cache usage: 0.3%, Prefix cache hit rate: 75.0%
(APIServer pid=1) INFO 07-28 05:51:55 [loggers.py:259] Engine 000: Avg prompt throughput: 0.0 tokens/s, Avg generation throughput: 23.9 tokens/s, Running: 1 reqs, Waiting: 0 reqs, GPU KV cache usage: 0.3%, Prefix cache hit rate: 75.0%
(APIServer pid=1) INFO 07-28 05:52:05 [loggers.py:259] Engine 000: Avg prompt throughput: 0.0 tokens/s, Avg generation throughput: 23.9 tokens/s, Running: 1 reqs, Waiting: 0 reqs, GPU KV cache usage: 0.3%, Prefix cache hit rate: 75.0%
(APIServer pid=1) INFO:     127.0.0.1:39358 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO 07-28 05:52:15 [loggers.py:259] Engine 000: Avg prompt throughput: 172.7 tokens/s, Avg generation throughput: 31.3 tokens/s, Running: 2 reqs, Waiting: 0 reqs, GPU KV cache usage: 0.4%, Prefix cache hit rate: 76.3%
(APIServer pid=1) INFO:     127.0.0.1:57762 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO 07-28 05:52:25 [loggers.py:259] Engine 000: Avg prompt throughput: 0.0 tokens/s, Avg generation throughput: 26.5 tokens/s, Running: 1 reqs, Waiting: 0 reqs, GPU KV cache usage: 0.3%, Prefix cache hit rate: 76.3%
(APIServer pid=1) INFO 07-28 05:52:35 [loggers.py:259] Engine 000: Avg prompt throughput: 0.0 tokens/s, Avg generation throughput: 23.8 tokens/s, Running: 1 reqs, Waiting: 0 reqs, GPU KV cache usage: 0.3%, Prefix cache hit rate: 76.3%
(APIServer pid=1) INFO 07-28 05:52:45 [loggers.py:259] Engine 000: Avg prompt throughput: 0.0 tokens/s, Avg generation throughput: 23.8 tokens/s, Running: 1 reqs, Waiting: 0 reqs, GPU KV cache usage: 0.3%, Prefix cache hit rate: 76.3%
(APIServer pid=1) INFO 07-28 05:52:55 [loggers.py:259] Engine 000: Avg prompt throughput: 213.4 tokens/s, Avg generation throughput: 23.2 tokens/s, Running: 1 reqs, Waiting: 0 reqs, GPU KV cache usage: 0.1%, Prefix cache hit rate: 72.6%

[링크 : https://huggingface.co/google/gemma-4-E4B-it]

[링크 : https://huggingface.co/google/gemma-4-31B-it]

[링크 : https://huggingface.co/Qwen/Qwen3.6-35B-A3B]

 

+

docker로 하나 돌고 있는 상황에서 하나더 돌리려고 하니 이런 에러가 난다.

110GiB를 먹고 시작하겠다.. 라는 패기라니.. ㄷㄷ

(EngineCore pid=127) ValueError: Free memory on device cuda:0 (42.65/122.8 GiB) on startup is less than desired GPU memory utilization (0.9, 110.52 GiB). Decrease GPU memory utilization or reduce GPU memory used by other processes.
[rank0]:[W728 04:30:09.155450975 ProcessGroupNCCL.cpp:1553] Warning: WARNING: destroy_process_group() was not called before program exit, which can leak resources. For more info, please see https://pytorch.org/docs/stable/distributed.html#shutdown (function operator())

 

 

+

20276.07.29

google/gemma-4-31B-it

$ docker run --pull=always --rm -it   --network host   --shm-size=16g   --ulimit memlock=-1   --ulimit stack=67108864   --runtime=nvidia   --name=vllm   -v $HOME/data/models/huggingface:/data/models/huggingface   ghcr.io/nvidia-ai-iot/vllm:gemma4-jetson-thor   vllm serve google/gemma-4-31B-it --enable-auto-tool-choice --tool-call-parser hermes
gemma4-jetson-thor: Pulling from nvidia-ai-iot/vllm

 

하나만 해서 하면 4 token/s 나오는데

두개 띄워놓고 동시에 갈궈대면 먼가 뻥튀기 되는 느낌?

(APIServer pid=1) INFO:     127.0.0.1:44406 - "GET /v1/models HTTP/1.1" 200 OK
(APIServer pid=1) INFO:     127.0.0.1:51624 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO 07-29 01:13:31 [loggers.py:259] Engine 000: Avg prompt throughput: 26.9 tokens/s, Avg generation throughput: 0.3 tokens/s, Running: 2 reqs, Waiting: 0 reqs, GPU KV cache usage: 4.7%, Prefix cache hit rate: 0.0%
(APIServer pid=1) INFO:     127.0.0.1:51620 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO:     127.0.0.1:51624 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO 07-29 01:13:41 [loggers.py:259] Engine 000: Avg prompt throughput: 552.2 tokens/s, Avg generation throughput: 5.8 tokens/s, Running: 2 reqs, Waiting: 0 reqs, GPU KV cache usage: 3.0%, Prefix cache hit rate: 47.1%
(APIServer pid=1) INFO:     127.0.0.1:50062 - "GET /v1/models HTTP/1.1" 200 OK
(APIServer pid=1) INFO:     127.0.0.1:50076 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO 07-29 01:13:51 [loggers.py:259] Engine 000: Avg prompt throughput: 6.3 tokens/s, Avg generation throughput: 8.1 tokens/s, Running: 4 reqs, Waiting: 0 reqs, GPU KV cache usage: 3.8%, Prefix cache hit rate: 64.3%
(APIServer pid=1) INFO:     127.0.0.1:51620 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO:     127.0.0.1:50070 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO:     127.0.0.1:50070 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO:     127.0.0.1:51620 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO 07-29 01:14:01 [loggers.py:259] Engine 000: Avg prompt throughput: 43.0 tokens/s, Avg generation throughput: 11.8 tokens/s, Running: 3 reqs, Waiting: 0 reqs, GPU KV cache usage: 3.5%, Prefix cache hit rate: 71.8%
(APIServer pid=1) INFO:     127.0.0.1:50988 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO:     127.0.0.1:51624 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO:     127.0.0.1:50070 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO 07-29 01:14:11 [loggers.py:259] Engine 000: Avg prompt throughput: 38.1 tokens/s, Avg generation throughput: 12.3 tokens/s, Running: 4 reqs, Waiting: 0 reqs, GPU KV cache usage: 3.9%, Prefix cache hit rate: 80.2%
(APIServer pid=1) INFO:     127.0.0.1:51256 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO 07-29 01:14:21 [loggers.py:259] Engine 000: Avg prompt throughput: 0.0 tokens/s, Avg generation throughput: 15.0 tokens/s, Running: 5 reqs, Waiting: 0 reqs, GPU KV cache usage: 4.4%, Prefix cache hit rate: 82.6%
(APIServer pid=1) INFO:     127.0.0.1:50076 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO:     127.0.0.1:51624 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO:     127.0.0.1:51624 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO 07-29 01:14:31 [loggers.py:259] Engine 000: Avg prompt throughput: 28.9 tokens/s, Avg generation throughput: 14.6 tokens/s, Running: 3 reqs, Waiting: 0 reqs, GPU KV cache usage: 3.9%, Prefix cache hit rate: 82.5%
(APIServer pid=1) INFO:     127.0.0.1:50070 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO:     127.0.0.1:50988 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO 07-29 01:14:41 [loggers.py:259] Engine 000: Avg prompt throughput: 41.5 tokens/s, Avg generation throughput: 13.6 tokens/s, Running: 3 reqs, Waiting: 0 reqs, GPU KV cache usage: 4.2%, Prefix cache hit rate: 83.9%
(APIServer pid=1) INFO:     127.0.0.1:51624 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO 07-29 01:14:51 [loggers.py:259] Engine 000: Avg prompt throughput: 0.0 tokens/s, Avg generation throughput: 9.8 tokens/s, Running: 2 reqs, Waiting: 0 reqs, GPU KV cache usage: 3.3%, Prefix cache hit rate: 83.9%
(APIServer pid=1) INFO 07-29 01:15:01 [loggers.py:259] Engine 000: Avg prompt throughput: 0.0 tokens/s, Avg generation throughput: 7.8 tokens/s, Running: 2 reqs, Waiting: 0 reqs, GPU KV cache usage: 3.3%, Prefix cache hit rate: 83.9%
(APIServer pid=1) INFO 07-29 01:15:11 [loggers.py:259] Engine 000: Avg prompt throughput: 0.0 tokens/s, Avg generation throughput: 7.6 tokens/s, Running: 2 reqs, Waiting: 0 reqs, GPU KV cache usage: 3.4%, Prefix cache hit rate: 83.9%
(APIServer pid=1) INFO 07-29 01:15:21 [loggers.py:259] Engine 000: Avg prompt throughput: 0.0 tokens/s, Avg generation throughput: 7.6 tokens/s, Running: 2 reqs, Waiting: 0 reqs, GPU KV cache usage: 3.5%, Prefix cache hit rate: 83.9%
(APIServer pid=1) INFO 07-29 01:15:31 [loggers.py:259] Engine 000: Avg prompt throughput: 0.0 tokens/s, Avg generation throughput: 7.6 tokens/s, Running: 2 reqs, Waiting: 0 reqs, GPU KV cache usage: 3.5%, Prefix cache hit rate: 83.9%
(APIServer pid=1) INFO 07-29 01:15:41 [loggers.py:259] Engine 000: Avg prompt throughput: 31.2 tokens/s, Avg generation throughput: 7.4 tokens/s, Running: 2 reqs, Waiting: 0 reqs, GPU KV cache usage: 3.8%, Prefix cache hit rate: 83.4%
(APIServer pid=1) INFO 07-29 01:15:51 [loggers.py:259] Engine 000: Avg prompt throughput: 0.0 tokens/s, Avg generation throughput: 7.8 tokens/s, Running: 2 reqs, Waiting: 0 reqs, GPU KV cache usage: 3.9%, Prefix cache hit rate: 83.4%
(APIServer pid=1) INFO:     127.0.0.1:51256 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO 07-29 01:16:01 [loggers.py:259] Engine 000: Avg prompt throughput: 0.0 tokens/s, Avg generation throughput: 6.5 tokens/s, Running: 1 reqs, Waiting: 0 reqs, GPU KV cache usage: 2.6%, Prefix cache hit rate: 83.4%
(APIServer pid=1) INFO 07-29 01:16:11 [loggers.py:259] Engine 000: Avg prompt throughput: 56.1 tokens/s, Avg generation throughput: 3.7 tokens/s, Running: 1 reqs, Waiting: 0 reqs, GPU KV cache usage: 1.4%, Prefix cache hit rate: 82.5%
(APIServer pid=1) INFO 07-29 01:16:21 [loggers.py:259] Engine 000: Avg prompt throughput: 0.0 tokens/s, Avg generation throughput: 3.9 tokens/s, Running: 1 reqs, Waiting: 0 reqs, GPU KV cache usage: 1.5%, Prefix cache hit rate: 82.5%
(APIServer pid=1) INFO:     127.0.0.1:50070 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO 07-29 01:16:31 [loggers.py:259] Engine 000: Avg prompt throughput: 0.0 tokens/s, Avg generation throughput: 0.6 tokens/s, Running: 0 reqs, Waiting: 0 reqs, GPU KV cache usage: 0.0%, Prefix cache hit rate: 82.5%
(APIServer pid=1) INFO 07-29 01:16:41 [loggers.py:259] Engine 000: Avg prompt throughput: 0.0 tokens/s, Avg generation throughput: 0.0 tokens/s, Running: 0 reqs, Waiting: 0 reqs, GPU KV cache usage: 0.0%, Prefix cache hit rate: 82.5%
(APIServer pid=1) INFO:     127.0.0.1:55952 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO 07-29 01:43:01 [loggers.py:259] Engine 000: Avg prompt throughput: 37.9 tokens/s, Avg generation throughput: 0.6 tokens/s, Running: 1 reqs, Waiting: 0 reqs, GPU KV cache usage: 2.6%, Prefix cache hit rate: 83.7%
(APIServer pid=1) INFO 07-29 01:43:11 [loggers.py:259] Engine 000: Avg prompt throughput: 0.0 tokens/s, Avg generation throughput: 3.9 tokens/s, Running: 1 reqs, Waiting: 0 reqs, GPU KV cache usage: 2.6%, Prefix cache hit rate: 83.7%
(APIServer pid=1) INFO:     127.0.0.1:58160 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO 07-29 01:43:21 [loggers.py:259] Engine 000: Avg prompt throughput: 68.3 tokens/s, Avg generation throughput: 5.9 tokens/s, Running: 2 reqs, Waiting: 0 reqs, GPU KV cache usage: 4.1%, Prefix cache hit rate: 84.4%
(APIServer pid=1) INFO 07-29 01:43:31 [loggers.py:259] Engine 000: Avg prompt throughput: 0.0 tokens/s, Avg generation throughput: 7.8 tokens/s, Running: 2 reqs, Waiting: 0 reqs, GPU KV cache usage: 4.1%, Prefix cache hit rate: 84.4%
(APIServer pid=1) INFO:     127.0.0.1:55952 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO 07-29 01:43:41 [loggers.py:259] Engine 000: Avg prompt throughput: 0.0 tokens/s, Avg generation throughput: 4.5 tokens/s, Running: 1 reqs, Waiting: 0 reqs, GPU KV cache usage: 2.6%, Prefix cache hit rate: 84.4%

 

+

Qwen3.6-35B-A3B

docker run --pull=always --rm -it   --network host   --shm-size=16g   --ulimit memlock=-1   --ulimit stack=67108864   --runtime=nvidia   --name=vllm   -v $HOME/data/models/huggingface:/data/models/huggingface   ghcr.io/nvidia-ai-iot/vllm:latest-jetson-thor   vllm serve Qwen/Qwen3.6-35B-A3B --enable-auto-tool-choice --tool-call-parser hermes

 

단독 사용

(APIServer pid=1) INFO 07-29 01:59:09 [loggers.py:259] Engine 000: Avg prompt throughput: 1250.0 tokens/s, Avg generation throughput: 31.8 tokens/s, Running: 3 reqs, Waiting: 0 reqs, GPU KV cache usage: 0.9%, Prefix cache hit rate: 0.0%
(APIServer pid=1) INFO 07-29 01:59:19 [loggers.py:259] Engine 000: Avg prompt throughput: 0.0 tokens/s, Avg generation throughput: 60.6 tokens/s, Running: 3 reqs, Waiting: 0 reqs, GPU KV cache usage: 0.9%, Prefix cache hit rate: 0.0%
(APIServer pid=1) INFO:     127.0.0.1:55540 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO 07-29 01:59:29 [loggers.py:259] Engine 000: Avg prompt throughput: 689.5 tokens/s, Avg generation throughput: 50.7 tokens/s, Running: 4 reqs, Waiting: 0 reqs, GPU KV cache usage: 1.1%, Prefix cache hit rate: 0.0%
(APIServer pid=1) INFO 07-29 01:59:39 [loggers.py:259] Engine 000: Avg prompt throughput: 0.0 tokens/s, Avg generation throughput: 81.2 tokens/s, Running: 4 reqs, Waiting: 0 reqs, GPU KV cache usage: 1.1%, Prefix cache hit rate: 0.0%

 

2개 창에서 2~3개씩 쌓고 함

(APIServer pid=1) INFO:     127.0.0.1:58426 - "GET /v1/models HTTP/1.1" 200 OK
(APIServer pid=1) INFO:     127.0.0.1:47306 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO 07-29 02:01:59 [loggers.py:259] Engine 000: Avg prompt throughput: 0.0 tokens/s, Avg generation throughput: 71.1 tokens/s, Running: 4 reqs, Waiting: 0 reqs, GPU KV cache usage: 1.5%, Prefix cache hit rate: 0.0%
(APIServer pid=1) INFO:     127.0.0.1:36898 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO 07-29 02:02:09 [loggers.py:259] Engine 000: Avg prompt throughput: 0.0 tokens/s, Avg generation throughput: 70.2 tokens/s, Running: 3 reqs, Waiting: 0 reqs, GPU KV cache usage: 1.3%, Prefix cache hit rate: 0.0%
(APIServer pid=1) INFO 07-29 02:02:19 [loggers.py:259] Engine 000: Avg prompt throughput: 0.0 tokens/s, Avg generation throughput: 60.6 tokens/s, Running: 3 reqs, Waiting: 0 reqs, GPU KV cache usage: 1.3%, Prefix cache hit rate: 0.0%
(APIServer pid=1) INFO:     127.0.0.1:40588 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO 07-29 02:02:29 [loggers.py:259] Engine 000: Avg prompt throughput: 833.0 tokens/s, Avg generation throughput: 48.0 tokens/s, Running: 4 reqs, Waiting: 0 reqs, GPU KV cache usage: 1.6%, Prefix cache hit rate: 0.0%
(APIServer pid=1) INFO:     127.0.0.1:47322 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO 07-29 02:02:39 [loggers.py:259] Engine 000: Avg prompt throughput: 35.4 tokens/s, Avg generation throughput: 78.2 tokens/s, Running: 4 reqs, Waiting: 0 reqs, GPU KV cache usage: 1.5%, Prefix cache hit rate: 0.0%
(APIServer pid=1) INFO:     127.0.0.1:46268 - "POST /v1/chat/completions HTTP/1.1" 200 OK
(APIServer pid=1) INFO 07-29 02:02:49 [loggers.py:259] Engine 000: Avg prompt throughput: 930.4 tokens/s, Avg generation throughput: 55.1 tokens/s, Running: 5 reqs, Waiting: 0 reqs, GPU KV cache usage: 1.8%, Prefix cache hit rate: 0.0%
(APIServer pid=1) INFO 07-29 02:02:59 [loggers.py:259] Engine 000: Avg prompt throughput: 0.0 tokens/s, Avg generation throughput: 67.0 tokens/s, Running: 5 reqs, Waiting: 0 reqs, GPU KV cache usage: 1.8%, Prefix cache hit rate: 0.0%

 

+

2026.07.30

위와 좀 다른데 mxfp4 와 Q2 양자화 속도 차이. mxfp4가 좀 더 빠르긴 하다.

$ ../../llama-b10145/llama-cli -m ./Qwen3.6-35B-A3B-MXFP4_MOE.gguf

> 안녕?
[ Prompt: 54.0 t/s | Generation: 43.2 t/s ]

> 너에 대해서 설명해줘
[ Prompt: 37.9 t/s | Generation: 42.9 t/s ]

> 파이썬으로 셀레니움을 통해 웹을 서칭하고 텍스트만 추출하고 makrdown 으로 변환후  md 파일과 pdf로 저장하는 기능을 구현해줘
[ Prompt: 111.9 t/s | Generation: 42.0 t/s ]


$ ../../llama-b10145/llama-cli -m ./Qwen3.6-35B-A3B-UD-Q2_K_XL.gguf 

> 안녕?  
[ Prompt: 9.8 t/s | Generation: 38.3 t/s ]

> 너에 대해서 설명해줘
[ Prompt: 41.7 t/s | Generation: 38.1 t/s ]

> 파이썬으로 셀레니움을 통해 웹을 서칭하고 텍스트만 추출하고 makrdown 으로 변환후  md 파일과 pdf로 저장하는 기능을 구현해줘 
[ Prompt: 86.9 t/s | Generation: 38.1 t/s ]

'embeded > jetson' 카테고리의 다른 글

wan2.2 nvfp4  (0) 2026.07.30
nvidia jetson agx thor / mig  (0) 2026.07.27
nvidia jetson agx thor / 디버그 usb  (0) 2026.07.27
nvidia-smi mig  (0) 2026.07.26
nvidia jetson agx thor dev kit 설치 - USB boot  (0) 2026.07.24
Posted by 구차니
embeded/jetson2026. 7. 27. 12:46

mig 사용하기 위한 설정들 시작!

필요없는 데몬들 죽이고, persistent mode on

 

nvidia-smi -mig 1 은 root 권한이 있어야 한다.

아무튼 켜주고 나면 MIG M. 에 Disabled에서 Enabled로 변경된다.

 

grahic instance만 생성하고 compute instance는 안했는데

gi가 생성되어서 그런가  insufficient resource라고 에러가 난다.

nvidia@nvidia:~$ sudo nvidia-smi mig -cgi 80,83
Successfully created GPU instance ID  2 on GPU  0 using profile MIG 1g.0gb (ID 80)
Successfully created GPU instance ID  1 on GPU  0 using profile MIG 2g.0gb+gfx (ID 83)
nvidia@nvidia:~$ nvidia-smi -L
GPU 0: NVIDIA Thor (UUID: GPU-a7c66ad2-6dbb-0ab8-c1a2-37ba6dba3600)
nvidia@nvidia:~$ nvidia-smi
...
|  No MIG devices found                                                                   |
...
nvidia@nvidia:~$ sudo nvidia-smi mig -cci 80,83
Unable to create a compute instance on GPU  0 GPU instance ID  2 using profile 80: Invalid Argument
Failed to create compute instances: Invalid Argument

nvidia@nvidia:~$ sudo nvidia-smi mig -cgi 80,83 -C
Unable to create a GPU instance on GPU  0 using profile 80: Insufficient Resources
Failed to create GPU instances: Insufficient Resources

 

하드웨어 건드리는거라 그런가 은근히 root 권한 많이 요청하네

mig -dgi 옵션으로 삭제

nvidia@nvidia:~$ nvidia-smi mig -dgi
No GPU instances found: Insufficient Permissions
nvidia@nvidia:~$ sudo nvidia-smi mig -dgi
Successfully destroyed GPU instance ID  2 from GPU  0
Successfully destroyed GPU instance ID  1 from GPU  0

 

-C 주면 잘 생성된다.

nvidia@nvidia:~$ sudo nvidia-smi mig -cgi 80,83 -C
Successfully created GPU instance ID  2 on GPU  0 using profile MIG 1g.0gb (ID 80)
Successfully created compute instance ID  0 on GPU  0 GPU instance ID  2 using profile MIG 1g.0gb (ID  0)
Successfully created GPU instance ID  1 on GPU  0 using profile MIG 2g.0gb+gfx (ID 83)
Successfully created compute instance ID  0 on GPU  0 GPU instance ID  1 using profile MIG 2g.0gb (ID  1)
nvidia@nvidia:~$ nvidia-smi -L
GPU 0: NVIDIA Thor (UUID: GPU-a7c66ad2-6dbb-0ab8-c1a2-37ba6dba3600)
  MIG 2g.0gb      Device  0: (UUID: MIG-031bd8db-02a6-5420-968d-7fcdf907f7e4)
  MIG 1g.0gb      Device  1: (UUID: MIG-60591740-f26d-525b-ad5a-5f5ba115bc71)

 

옵션 주면 ci랑 di 생성된게 보인다.

 

-C 안주고 하나씩 하는거 어떻게 해야하지 ? 일단 맨땅에 헤딩 시작!

자원부족이라고 난리나고 있다.

nvidia@nvidia:~$ sudo nvidia-smi mig -dci
Successfully destroyed compute instance ID  0 from GPU  0 GPU instance ID  2
Successfully destroyed compute instance ID  0 from GPU  0 GPU instance ID  1
nvidia@nvidia:~$ sudo nvidia-smi mig -cgi 80,83 
Unable to create a GPU instance on GPU  0 using profile 80: Insufficient Resources
Failed to create GPU instances: Insufficient Resources
nvidia@nvidia:~$ sudo nvidia-smi mig -lci
No compute instances found: Not Found

 

먼가 빼먹은거 같으니 일단 삭제하고

nvidia@nvidia:~$ sudo nvidia-smi mig -dgi 80,83 
Option "80,83" is not recognized.
nvidia@nvidia:~$ sudo nvidia-smi mig -dgi 1,2
Option "1,2" is not recognized.
nvidia@nvidia:~$ sudo nvidia-smi mig -dgi
Successfully destroyed GPU instance ID  2 from GPU  0
Successfully destroyed GPU instance ID  1 from GPU  0

 

list ci/gi profile 명령으로 식별자 확인.. 음.. 위에서 not recognized 뜰만했네

그나저나 lcip 에서 1c.2g.0gb는 어따 써야 쓸 수 있을까?

 

몇 번 해보니 gi를 생성하고 거기에 ci 프로필을 연결해서 생성하면 되는것 같다.

nvidia@nvidia:~$ sudo nvidia-smi mig -cci -gi 1
Successfully created compute instance ID  0 on GPU  0 GPU instance ID  1 using profile MIG 2g.0gb (ID  1)
nvidia@nvidia:~$ sudo nvidia-smi mig -cci -gi 2
Successfully created compute instance ID  0 on GPU  0 GPU instance ID  2 using profile MIG 1g.0gb (ID  0)

 

-C 준 것 처럼 생성된 것 같기도?

 

그래서 동시에 접속해서 해보니 성능도 많이 떨어지지만, (기준 140 token/s <, 현재 60+ 45 token/s, 75%)

동시에 되는거 봐서는 잘 나눠진거 같은데..

문제는 소비전력이 이상하게 낮고(단독으로 돌리면 24W. 성능 저하랑 고라혀면 24*0.75 = 16W 딱인가?)

사용율은 N/A가 되서 나오지 않는 점. 그게 관리 상의 난점이군.

 

+

다시 한번 시도. 직접 지정해주는게 큰 의미는 없어 보이니까, 그냥 -C 하는게 나을듯 하다.

그나저나 ci 에서 0과 0*의 차이를 모르겠다. "*" 달린 애가 우선적으로 된다는 의미이려나?

nvidia@nvidia:~/llm$ sudo nvidia-smi mig -lcip
+--------------------------------------------------------------------------------------+
| Compute instance profiles:                                                           |
| GPU     GPU       Name             Profile  Instances   Exclusive       Shared       |
|       Instance                       ID     Free/Total     SM       DEC   ENC   OFA  |
|         ID                                                          CE    JPEG       |
|======================================================================================|
|   0      2       MIG 1g.0gb           0*     1/1            6        1     1     0   |
|                                                                      1     1         |
+--------------------------------------------------------------------------------------+
|   0      1       MIG 1c.2g.0gb        0      1/1            6        1     1     0   |
|                                                                      1     1         |
+--------------------------------------------------------------------------------------+
|   0      1       MIG 2g.0gb           1*     1/1           12        1     1     0   |
|                                                                      1     1         |
+--------------------------------------------------------------------------------------+

nvidia@nvidia:~/llm$ nvidia-smi -L; sudo nvidia-smi mig -lgi ; sudo nvidia-smi mig -lci
GPU 0: NVIDIA Thor (UUID: GPU-a7c66ad2-6dbb-0ab8-c1a2-37ba6dba3600)
+---------------------------------------------------------+
| GPU instances:                                          |
| GPU   Name               Profile  Instance   Placement  |
|                            ID       ID       Start:Size |
|=========================================================|
|   0  MIG 1g.0gb            80        2          2:1     |
+---------------------------------------------------------+
|   0  MIG 2g.0gb+gfx        83        1          0:2     |
+---------------------------------------------------------+
No compute instances found: Not Found

nvidia@nvidia:~/llm$ sudo nvidia-smi mig -gi 2 -cci 1
Unable to create a compute instance on GPU  0 GPU instance ID  2 using profile 1: Invalid Argument
Failed to create compute instances: Invalid Argument

nvidia@nvidia:~/llm$ sudo nvidia-smi mig -gi 2 -cci 0
Successfully created compute instance ID  0 on GPU  0 GPU instance ID  2 using profile MIG 1g.0gb (ID  0)

nvidia@nvidia:~/llm$ nvidia-smi -L; sudo nvidia-smi mig -lgi ; sudo nvidia-smi mig -lci 
GPU 0: NVIDIA Thor (UUID: GPU-a7c66ad2-6dbb-0ab8-c1a2-37ba6dba3600)
  MIG 1g.0gb      Device  0: (UUID: MIG-60591740-f26d-525b-ad5a-5f5ba115bc71)
+---------------------------------------------------------+
| GPU instances:                                          |
| GPU   Name               Profile  Instance   Placement  |
|                            ID       ID       Start:Size |
|=========================================================|
|   0  MIG 1g.0gb            80        2          2:1     |
+---------------------------------------------------------+
|   0  MIG 2g.0gb+gfx        83        1          0:2     |
+---------------------------------------------------------+
+--------------------------------------------------------------------+
| Compute instances:                                                 |
| GPU     GPU       Name             Profile   Instance   Placement  |
|       Instance                       ID        ID       Start:Size |
|         ID                                                         |
|====================================================================|
|   0      2       MIG 1g.0gb           0         0          0:1     |
+--------------------------------------------------------------------+

 

'embeded > jetson' 카테고리의 다른 글

wan2.2 nvfp4  (0) 2026.07.30
nvidia jetson agx thor / vLLM 시도  (0) 2026.07.28
nvidia jetson agx thor / 디버그 usb  (0) 2026.07.27
nvidia-smi mig  (0) 2026.07.26
nvidia jetson agx thor dev kit 설치 - USB boot  (0) 2026.07.24
Posted by 구차니
embeded/jetson2026. 7. 27. 12:36

한번 꽂아보니 4개 포트가 뜨고

[250997.559440] usb 1-2: new full-speed USB device number 11 using xhci_hcd
[250997.687952] usb 1-2: New USB device found, idVendor=0955, idProduct=7045, bcdDevice= 0.01
[250997.687971] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[250997.687978] usb 1-2: Product: Tegra On-Platform Operator
[250997.687983] usb 1-2: Manufacturer: NVIDIA
[250997.687988] usb 1-2: SerialNumber: TOPOA735A12B
[250997.698054] hid-generic 0003:0955:7045.000B: hiddev2,hidraw9: USB HID v1.10 Device [NVIDIA Tegra On-Platform Operator] on usb-0000:00:14.0-2/input0
[250997.736401] cdc_acm 1-2:1.1: ttyACM0: USB ACM device
[250997.736738] cdc_acm 1-2:1.3: ttyACM1: USB ACM device
[250997.737020] cdc_acm 1-2:1.5: ttyACM2: USB ACM device
[250997.737348] cdc_acm 1-2:1.7: ttyACM3: USB ACM device
[250997.737379] usbcore: registered new interface driver cdc_acm
[250997.737381] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters

 

/dev/ttyACM0 (왼쪽) 은 커널 로그

/dev/ttyACM1 (오른쪽)은 uefi 가 뜬다.

 

esc 누르니까 저렇게 뜬다. 예전에 imx8mp evk 보드에서 windows on arm 돌리는 느낌이네..

선택이 안보여서 minicom -c on 옵션주고 나니 이제야 머가 선택되었는지 보인다.

'embeded > jetson' 카테고리의 다른 글

nvidia jetson agx thor / vLLM 시도  (0) 2026.07.28
nvidia jetson agx thor / mig  (0) 2026.07.27
nvidia-smi mig  (0) 2026.07.26
nvidia jetson agx thor dev kit 설치 - USB boot  (0) 2026.07.24
nvidia MIG(multiple instance GPU) - thor  (0) 2026.07.24
Posted by 구차니
embeded/jetson2026. 7. 26. 22:13

아무생각없이 블로그 글 따라보고

-cgi -C 했는데

원래 대로라면

-cgi

-cci 할걸

-cgi -C로 해결하는 듯?

 

$ nvidia-smi mig

    mig -- Multi Instance GPU management.

    Usage: nvidia-smi mig [options]

    Options include:
    [-h | --help]: Display help information.
    [-i | --id]: Enumeration index, PCI bus ID or UUID.
                 Provide comma separated values for more than one device.
    [-gi | --gpu-instance-id]: GPU instance ID.
                               Provide comma separated values for more than one GPU instance.
    [-ci | --compute-instance-id]: Compute instance ID.
                                   Provide comma separated values for more than one compute
                                   instance.
    [-lgip | --list-gpu-instance-profiles]: List supported GPU instance profiles.
                                            Option -i can be used to restrict the command to
                                            run on a specific GPU.
    [-lgipp | --list-gpu-instance-possible-placements]: List possible GPU instance placements
                                                        in the following format, {Start}:Size.
                                                        Option -i can be used to restrict the
                                                        command to run on a specific GPU.
    [-C | --default-compute-instance]: Create compute instance with the default profile when used
                                       with the option to create a GPU instance (-cgi).
    [-cgi | --create-gpu-instance]: Create GPU instances for the given profile tuples. A profile
                                    tuple consists of a profile name or ID and an optional placement
                                    specifier, which consists of a colon and a placement start index.
                                    Provide comma separated values for more than one profile tuple.
                                    Option -i can be used to restrict the command to run on
                                    a specific GPU.
    [-dgi | --destroy-gpu-instance]: Destroy GPU instances.
                                     Options -i and -gi can be used individually or combined
                                     to restrict the command to run on a specific GPU or GPU
                                     instance.
    [-lgi | --list-gpu-instances]: List GPU instances.
                                   Option -i can be used to restrict the command to run on a
                                   specific GPU.
    [-lcip | --list-compute-instance-profiles]: List supported compute instance profiles.
                                                Options -i and -gi can be used individually or
                                                combined to restrict the command to run on a
                                                specific GPU or GPU instance.
    [-lcipp | --list-compute-instance-possible-placements]: List possible compute instance placements
                                                            in the following format, {Start}:Size.
                                                            Options -i and -gi can be used individually or
                                                            combined to restrict the command to run on a
                                                            specific GPU or GPU instance.
    [-cci | --create-compute-instance]: Create compute instance for the given profile name or IDs.
                                        Provide comma separated values for more than one profile.
                                        If no profile name or ID is given, then the default*
                                        compute instance profile ID will be used. Options -i and
                                        -gi can be used individually or combined to restrict the
                                        command to run on a specific GPU or GPU instance.
    [-dci | --destroy-compute-instance]: Destroy compute instances.
                                         Options -i, -gi and -ci can be used individually or
                                         combined to restrict the command to run on a specific
                                         GPU or GPU instance or compute instance.
    [-lci | --list-compute-instances]: List compute instances.
                                       Options -i and -gi can be used individually or combined
                                       to restrict the command to run on a specific GPU or GPU
                                       instance.

 

+

2026.07.29

심심해서 mig 지원하지 않는 1080 ti 에서 시도

$ sudo nvidia-smi -mig 1
Unable to enable MIG Mode for GPU 00000000:01:00.0: Not Supported
Treating as warning and moving on.
Unable to enable MIG Mode for GPU 00000000:02:00.0: Not Supported
Treating as warning and moving on.
All done.

 

근데 A100 이런데서도 1개의 CU가 못쓰게 되서(관리용?)

총 성능 자체는 손해보는셈이고 모니터링도 쉽지 않아서 실 효용은 높지 않을 것 같다.

Posted by 구차니