Views
No views yet
⚠️ 이 리포는 소스 모델이 아니라 "특정 장비용으로 컴파일된 TensorRT 엔진"입니다. TensorRT 엔진은 GPU 아키텍처와 TensorRT 버전에 종속됩니다. 아래 호환 환경과 정확히 일치하는 장비에서만 로드됩니다. 다른 GPU/JetPack/TRT 버전에서는 동작하지 않습니다(소스 체크포인트로 직접 빌드 필요).
| 항목 | 요구 사항 |
|---|---|
| 장비 | Jetson AGX Orin 64GB |
| GPU 아키텍처 | Ampere sm_87 |
| SW 스택 | JetPack 7.x / CUDA 13.2 / TensorRT 10 |
| 런타임 | NVIDIA TensorRT-Edge-LLM (동일 버전으로 빌드된 바이너리) |
Serialization ... Version tag does not match 오류가 납니다.| 항목 | 값 |
|---|---|
| 베이스 모델 | Qwen/Qwen3.5-9B |
| 모달리티 | Text + Image (VLM) |
| 양자화 | INT4-AWQ (FFN 가중치 externalize) |
| 아키텍처 | GDN 하이브리드 (linear-attn 24 + attn 8), hidden 4096, 32 layers |
| Vocab | 248,320 |
| 엔진 GPU 메모리 | ≈ 15–16 GB (로드 시) |
| 컨텍스트 | maxInputLen 2048 / KV 8192 (빌드 설정값) |
.
├── README.md
├── llm/ # 텍스트 백본 엔진
│ ├── llm.engine
│ ├── config.json
│ ├── embedding.safetensors
│ ├── tokenizer.json
│ ├── tokenizer_config.json
│ └── processed_chat_template.json
└── visual/ # 비전 인코더 엔진
├── visual.engine
├── config.json
└── preprocessor_config.jsonllm_inference 예제로 실행합니다.input_vlm.json) — 이미지 경로는 실제 파일로 교체:1{
2 "batch_size": 1,
3 "temperature": 1.0, "top_p": 0.95, "top_k": 20,
4 "max_generate_length": 256,
5 "requests": [
6 {
7 "messages": [
8 { "role": "system", "content": "You are a helpful assistant." },
9 { "role": "user", "content": [
10 { "type": "image", "image": "/home/bluesanta/llm/test.jpg" },
11 { "type": "text", "text": "이 이미지를 설명해줘." }
12 ]}
13 ]
14 }
15 ]
16}1./build/examples/llm/llm_inference \
2 --engineDir /path/to/Qwen3.5-9B-int4-awq-engines/llm \
3 --multimodalEngineDir /path/to/Qwen3.5-9B-int4-awq-engines/visual \
4 --inputFile ~/llm/input_vlm.json \
5 --outputFile ~/llm/output_vlm.json
6
7cat ~/llm/output_vlm.json[INFO] Loaded FP16 embedding: [248320, 4096]
[INFO] LLMEngineConfig{ hiddenSize=4096 vocabSize=248320 numDecoderLayers=32
numAttentionLayers=8 numKVHeads=4 headDim=256 maxBatch=1
maxInputLen=2048 maxKVCapacity=8192 numLinearAttnLayers=24 ... }
[INFO] engine loaded successfully (118 I/O tensors) GPU 15138 MiB
[INFO] Vision runner successfully initialized GPU 16013 MiB
[INFO] Processing 1 batched requests...
[INFO] Processing complete: 1/1 batched requests successful
[INFO] All responses exported to: output_vlm.jsonoutput_vlm.json):1{
2 "responses": [{
3 "finish_reason": "max-length",
4 "output_text": "이 이미지는 마블 시네마틱 유니버스(MCU)의 영화 **어벤저스: 엔드게임 (Avengers: Endgame)**의 포스터입니다.\n\n포스터는 다음과 같은 특징을 가지고 있습니다:\n\n- 주요 등장인물: 캡틴 아메리카, 아이언맨, 토르, 블랙 위도우, 헐크, 블랙 팬서, 닥터 스트레인지, 스파이더맨 ..."
5 }]
6}image 블록을 빼고 text만 넣으면 됩니다(비전 엔진 없이 --engineDir만으로 실행).1# 1) INT4-AWQ 체크포인트를 ONNX로 export (FFN 가중치 externalize)
2tensorrt-edgellm-export Qwen3.5-9B-int4-awq Qwen3.5-9B-int4-awq-onnx --externalize-weights int4_ffn
3
4# 2) 텍스트 LLM 엔진 빌드
5./build/examples/llm/llm_build \
6 --onnxDir Qwen3.5-9B-int4-awq-onnx/llm \
7 --engineDir Qwen3.5-9B-int4-awq-engines/llm \
8 --maxBatchSize 1 --maxInputLen 2048 --maxKVCacheCapacity 8192
9
10# 3) 비전 인코더 엔진 빌드
11./build/examples/multimodal/visual_build \
12 --onnxDir Qwen3.5-9B-int4-awq-onnx/visual \
13 --engineDir Qwen3.5-9B-int4-awq-engines \
14 --minImageTokens 128 --maxImageTokens 512 --maxImageTokensPerImage 512maxInputLen 2048 / KV 8192로 고정. 더 긴 컨텍스트가 필요하면 소스에서 값을 키워 재빌드하세요.