deepseek_ocr_server_8707_20260204_165931.log 14 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
INFO 02-04 16:59:36 [__init__.py:240] Automatically detected platform rocm.
/home/lst/DeepSeek-OCR2-vllm/deepseek_ocr_server.py:478: DeprecationWarning: 
        on_event is deprecated, use lifespan event handlers instead.

        Read more about it in the
        [FastAPI docs for Lifespan Events](https://fastapi.tiangolo.com/advanced/events/).
        
  @app.on_event("shutdown")
[INFO] 加载模型: /home/lst/deepseek_ocr2
INFO 02-04 16:59:41 [config.py:460] Overriding HF config with {'architectures': ['DeepseekOCR2ForCausalLM']}
INFO 02-04 16:59:41 [config.py:721] This model supports multiple tasks: {'embed', 'classify', 'generate', 'score', 'reward'}. Defaulting to 'generate'.
INFO 02-04 16:59:41 [llm_engine.py:244] Initializing a V0 LLM engine (v0.8.5.post1) with config: model='/home/lst/deepseek_ocr2', speculative_config=None, tokenizer='/home/lst/deepseek_ocr2', skip_tokenizer_init=False, tokenizer_mode=auto, revision=None, override_neuron_config=None, tokenizer_revision=None, trust_remote_code=True, dtype=torch.bfloat16, max_seq_len=8192, download_dir=None, load_format=auto, tensor_parallel_size=1, pipeline_parallel_size=1, disable_custom_all_reduce=False, quantization=None, enforce_eager=False, kv_cache_dtype=auto,  device_config=cuda, decoding_config=DecodingConfig(guided_decoding_backend='xgrammar', reasoning_backend=None), observability_config=ObservabilityConfig(show_hidden_metrics=False, otlp_traces_endpoint=None, collect_model_forward_time=False, collect_model_execute_time=False), seed=None, served_model_name=/home/lst/deepseek_ocr2, num_scheduler_steps=1, multi_step_stream_outputs=True, enable_prefix_caching=None, chunked_prefill_enabled=False, use_async_output_proc=True, disable_mm_preprocessor_cache=True, mm_processor_kwargs=None, pooler_config=None, compilation_config={"splitting_ops":[],"compile_sizes":[],"cudagraph_capture_sizes":[24,16,8,4,2,1],"max_capture_size":24}, use_cached_outputs=False, 
INFO 02-04 16:59:41 [rocm.py:226] None is not supported in AMD GPUs.
INFO 02-04 16:59:41 [rocm.py:227] Using ROCmFlashAttention backend.
WARNING 02-04 16:59:41 [worker_base.py:41] VLLM_RANK0_NUMA is unset or set incorrectly, vllm will not bind to numa! VLLM_RANK0_NUMA = -1
INFO 02-04 16:59:41 [worker_base.py:653] ########## 42893 process(rank0) is running on CPU(s): {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31}
INFO 02-04 16:59:41 [worker_base.py:654] ########## 42893 process(rank0) is running on memnode(s): {0, 1, 2, 3}
WARNING: Logging before InitGoogleLogging() is written to STDERR
I0204 16:59:42.128494 42893 ProcessGroupNCCL.cpp:881] [PG 0 Rank 0] ProcessGroupNCCL initialization options: size: 1, global rank: 0, TIMEOUT(ms): 600000, USE_HIGH_PRIORITY_STREAM: 0, SPLIT_FROM: 0, SPLIT_COLOR: 0, PG Name: 0
I0204 16:59:42.128578 42893 ProcessGroupNCCL.cpp:890] [PG 0 Rank 0] ProcessGroupNCCL environments: NCCL version: 2.18.3, TORCH_NCCL_ASYNC_ERROR_HANDLING: 3, TORCH_NCCL_DUMP_ON_TIMEOUT: 0, TORCH_NCCL_WAIT_TIMEOUT_DUMP_MILSEC: 60000, TORCH_NCCL_DESYNC_DEBUG: 0, TORCH_NCCL_ENABLE_TIMING: 0, TORCH_NCCL_BLOCKING_WAIT: 0, TORCH_DISTRIBUTED_DEBUG: OFF, TORCH_NCCL_ENABLE_MONITORING: 1, TORCH_NCCL_HEARTBEAT_TIMEOUT_SEC: 600, TORCH_NCCL_TRACE_BUFFER_SIZE: 0, TORCH_NCCL_COORD_CHECK_MILSEC: 1000, TORCH_NCCL_NAN_CHECK: 0
I0204 16:59:42.129037 42893 ProcessGroupNCCL.cpp:881] [PG 1 Rank 0] ProcessGroupNCCL initialization options: size: 1, global rank: 0, TIMEOUT(ms): 600000, USE_HIGH_PRIORITY_STREAM: 0, SPLIT_FROM: 0x5571e7a2cd20, SPLIT_COLOR: 3389850942126204093, PG Name: 1
I0204 16:59:42.129053 42893 ProcessGroupNCCL.cpp:890] [PG 1 Rank 0] ProcessGroupNCCL environments: NCCL version: 2.18.3, TORCH_NCCL_ASYNC_ERROR_HANDLING: 3, TORCH_NCCL_DUMP_ON_TIMEOUT: 0, TORCH_NCCL_WAIT_TIMEOUT_DUMP_MILSEC: 60000, TORCH_NCCL_DESYNC_DEBUG: 0, TORCH_NCCL_ENABLE_TIMING: 0, TORCH_NCCL_BLOCKING_WAIT: 0, TORCH_DISTRIBUTED_DEBUG: OFF, TORCH_NCCL_ENABLE_MONITORING: 1, TORCH_NCCL_HEARTBEAT_TIMEOUT_SEC: 600, TORCH_NCCL_TRACE_BUFFER_SIZE: 0, TORCH_NCCL_COORD_CHECK_MILSEC: 1000, TORCH_NCCL_NAN_CHECK: 0
I0204 16:59:42.149024 42893 ProcessGroupNCCL.cpp:881] [PG 3 Rank 0] ProcessGroupNCCL initialization options: size: 1, global rank: 0, TIMEOUT(ms): 600000, USE_HIGH_PRIORITY_STREAM: 0, SPLIT_FROM: 0x5571e7a2cd20, SPLIT_COLOR: 3389850942126204093, PG Name: 3
I0204 16:59:42.149070 42893 ProcessGroupNCCL.cpp:890] [PG 3 Rank 0] ProcessGroupNCCL environments: NCCL version: 2.18.3, TORCH_NCCL_ASYNC_ERROR_HANDLING: 3, TORCH_NCCL_DUMP_ON_TIMEOUT: 0, TORCH_NCCL_WAIT_TIMEOUT_DUMP_MILSEC: 60000, TORCH_NCCL_DESYNC_DEBUG: 0, TORCH_NCCL_ENABLE_TIMING: 0, TORCH_NCCL_BLOCKING_WAIT: 0, TORCH_DISTRIBUTED_DEBUG: OFF, TORCH_NCCL_ENABLE_MONITORING: 1, TORCH_NCCL_HEARTBEAT_TIMEOUT_SEC: 600, TORCH_NCCL_TRACE_BUFFER_SIZE: 0, TORCH_NCCL_COORD_CHECK_MILSEC: 1000, TORCH_NCCL_NAN_CHECK: 0
I0204 16:59:42.150310 42893 ProcessGroupNCCL.cpp:881] [PG 5 Rank 0] ProcessGroupNCCL initialization options: size: 1, global rank: 0, TIMEOUT(ms): 600000, USE_HIGH_PRIORITY_STREAM: 0, SPLIT_FROM: 0x5571e7a2cd20, SPLIT_COLOR: 3389850942126204093, PG Name: 5
I0204 16:59:42.150334 42893 ProcessGroupNCCL.cpp:890] [PG 5 Rank 0] ProcessGroupNCCL environments: NCCL version: 2.18.3, TORCH_NCCL_ASYNC_ERROR_HANDLING: 3, TORCH_NCCL_DUMP_ON_TIMEOUT: 0, TORCH_NCCL_WAIT_TIMEOUT_DUMP_MILSEC: 60000, TORCH_NCCL_DESYNC_DEBUG: 0, TORCH_NCCL_ENABLE_TIMING: 0, TORCH_NCCL_BLOCKING_WAIT: 0, TORCH_DISTRIBUTED_DEBUG: OFF, TORCH_NCCL_ENABLE_MONITORING: 1, TORCH_NCCL_HEARTBEAT_TIMEOUT_SEC: 600, TORCH_NCCL_TRACE_BUFFER_SIZE: 0, TORCH_NCCL_COORD_CHECK_MILSEC: 1000, TORCH_NCCL_NAN_CHECK: 0
I0204 16:59:42.151289 42893 ProcessGroupNCCL.cpp:881] [PG 7 Rank 0] ProcessGroupNCCL initialization options: size: 1, global rank: 0, TIMEOUT(ms): 600000, USE_HIGH_PRIORITY_STREAM: 0, SPLIT_FROM: 0x5571e7a2cd20, SPLIT_COLOR: 3389850942126204093, PG Name: 7
I0204 16:59:42.151312 42893 ProcessGroupNCCL.cpp:890] [PG 7 Rank 0] ProcessGroupNCCL environments: NCCL version: 2.18.3, TORCH_NCCL_ASYNC_ERROR_HANDLING: 3, TORCH_NCCL_DUMP_ON_TIMEOUT: 0, TORCH_NCCL_WAIT_TIMEOUT_DUMP_MILSEC: 60000, TORCH_NCCL_DESYNC_DEBUG: 0, TORCH_NCCL_ENABLE_TIMING: 0, TORCH_NCCL_BLOCKING_WAIT: 0, TORCH_DISTRIBUTED_DEBUG: OFF, TORCH_NCCL_ENABLE_MONITORING: 1, TORCH_NCCL_HEARTBEAT_TIMEOUT_SEC: 600, TORCH_NCCL_TRACE_BUFFER_SIZE: 0, TORCH_NCCL_COORD_CHECK_MILSEC: 1000, TORCH_NCCL_NAN_CHECK: 0
INFO 02-04 16:59:42 [parallel_state.py:1004] rank 0 in world size 1 is assigned as DP rank 0, PP rank 0, TP rank 0
INFO 02-04 16:59:42 [model_runner.py:1133] Starting to load model /home/lst/deepseek_ocr2...
Using the `SDPA` attention implementation on multi-gpu setup with ROCM may lead to performance issues due to the FA backend. Disabling it to use alternative backends.
INFO 02-04 16:59:43 [config.py:3627] cudagraph sizes specified by model runner [1, 2, 4, 8, 16, 24] is overridden by config [1, 2, 4, 8, 16, 24]

Loading safetensors checkpoint shards:   0% Completed | 0/1 [00:00<?, ?it/s]

Loading safetensors checkpoint shards: 100% Completed | 1/1 [00:00<00:00,  7.14it/s]

Loading safetensors checkpoint shards: 100% Completed | 1/1 [00:00<00:00,  7.12it/s]

INFO 02-04 16:59:45 [loader.py:460] Loading weights took 1.71 seconds
INFO 02-04 16:59:45 [model_runner.py:1165] Model loading took 6.3336 GiB and 3.386030 seconds
Some kwargs in processor config are unused and will not have any effect: normalize, image_std, mask_prompt, image_token, candidate_resolutions, add_special_token, image_mean, pad_token, downsample_ratio, patch_size, ignore_id, sft_format. 
/home/lst/DeepSeek-OCR2-vllm/deepencoderv2/sam_vary_sdpa.py:310: UserWarning: 1Torch was not compiled with memory efficient attention. (Triggered internally at /home/pytorch/aten/src/ATen/native/transformers/hip/sdp_utils.cpp:627.)
  x = torch.nn.functional.scaled_dot_product_attention(q, k, v, attn_mask=attn_bias)
WARNING 02-04 16:59:57 [fused_moe.py:882] Using default MoE config. Performance might be sub-optimal! Config file not found at /usr/local/lib/python3.10/dist-packages/vllm/model_executor/layers/fused_moe/configs/E=64,N=896,device_name=K100_AI.json
INFO 02-04 16:59:57 [worker.py:287] Memory profiling takes 12.02 seconds
INFO 02-04 16:59:57 [worker.py:287] the current vLLM instance can use total_gpu_memory (63.98GiB) x gpu_memory_utilization (0.90) = 57.59GiB
INFO 02-04 16:59:57 [worker.py:287] model weights take 6.33GiB; non_torch_memory takes 1.58GiB; PyTorch activation peak memory takes 2.00GiB; the rest of the memory reserved for KV Cache is 47.67GiB.
INFO 02-04 16:59:58 [executor_base.py:112] # rocm blocks: 13017, # CPU blocks: 0
INFO 02-04 16:59:58 [executor_base.py:117] Maximum concurrency for 8192 tokens per request: 101.70x
INFO 02-04 16:59:58 [model_runner.py:1523] Capturing cudagraphs for decoding. This may lead to unexpected consequences if the model is not static. To run the model in eager mode, set 'enforce_eager=True' or use '--enforce-eager' in the CLI. If out-of-memory error occurs during cudagraph capture, consider decreasing `gpu_memory_utilization` or switching to eager mode. You can also reduce the `max_num_seqs` as needed to decrease memory usage.

Capturing CUDA graph shapes:   0%|          | 0/6 [00:00<?, ?it/s]
Capturing CUDA graph shapes:  17%|█▋        | 1/6 [00:00<00:02,  1.93it/s]
Capturing CUDA graph shapes:  33%|███▎      | 2/6 [00:00<00:01,  2.03it/s]
Capturing CUDA graph shapes:  50%|█████     | 3/6 [00:01<00:01,  2.06it/s]
Capturing CUDA graph shapes:  67%|██████▋   | 4/6 [00:01<00:00,  2.04it/s]
Capturing CUDA graph shapes:  83%|████████▎ | 5/6 [00:02<00:00,  2.05it/s]
Capturing CUDA graph shapes: 100%|██████████| 6/6 [00:02<00:00,  2.07it/s]
Capturing CUDA graph shapes: 100%|██████████| 6/6 [00:02<00:00,  2.05it/s]
INFO 02-04 17:00:01 [model_runner.py:1752] Graph capturing finished in 3 secs, took 0.12 GiB
INFO 02-04 17:00:01 [llm_engine.py:447] init engine (profile, create kv cache, warmup model) took 15.56 seconds
[SUCCESS] 模型加载完成
[INFO] 线程池配置:
   - CPU 线程池: 2 线程
   - GPU 线程池: 1 线程

[INFO] 服务启动: http://0.0.0.0:8707
[INFO] 接口文档: http://0.0.0.0:8707/docs

INFO:     Started server process [42893]
INFO:     Waiting for application startup.
INFO:     Application startup complete.
INFO:     Uvicorn running on http://0.0.0.0:8707 (Press CTRL+C to quit)
Some kwargs in processor config are unused and will not have any effect: normalize, image_std, mask_prompt, image_token, candidate_resolutions, add_special_token, image_mean, pad_token, downsample_ratio, patch_size, ignore_id, sft_format. 
   [1/3] Tokenize 22 页...
   [1/3] Tokenize 完成
   [2/3] GPU 批量推理 22 页...

Processed prompts:   0%|          | 0/22 [00:00<?, ?it/s, est. speed input: 0.00 toks/s, output: 0.00 toks/s]
Processed prompts:   5%|▍         | 1/22 [00:15<05:23, 15.42s/it, est. speed input: 73.37 toks/s, output: 6.42 toks/s]
Processed prompts:   9%|▉         | 2/22 [00:16<02:14,  6.72s/it, est. speed input: 140.92 toks/s, output: 12.40 toks/s]
Processed prompts:  14%|█▎        | 3/22 [00:18<01:34,  4.95s/it, est. speed input: 179.52 toks/s, output: 19.31 toks/s]
Processed prompts:  18%|█▊        | 4/22 [00:20<01:07,  3.74s/it, est. speed input: 217.61 toks/s, output: 28.33 toks/s]
Processed prompts:  23%|██▎       | 5/22 [00:22<00:48,  2.85s/it, est. speed input: 256.45 toks/s, output: 38.64 toks/s]
Processed prompts:  27%|██▋       | 6/22 [00:23<00:35,  2.23s/it, est. speed input: 293.84 toks/s, output: 49.71 toks/s]
Processed prompts:  32%|███▏      | 7/22 [00:29<00:54,  3.62s/it, est. speed input: 267.89 toks/s, output: 56.31 toks/s]
Processed prompts:  36%|███▋      | 8/22 [00:31<00:45,  3.22s/it, est. speed input: 283.54 toks/s, output: 70.82 toks/s]
Processed prompts:  41%|████      | 9/22 [00:32<00:32,  2.50s/it, est. speed input: 309.93 toks/s, output: 87.93 toks/s]
Processed prompts:  45%|████▌     | 10/22 [00:35<00:30,  2.53s/it, est. speed input: 319.03 toks/s, output: 101.77 toks/s]
Processed prompts:  50%|█████     | 11/22 [00:37<00:26,  2.44s/it, est. speed input: 330.25 toks/s, output: 117.07 toks/s]
Processed prompts:  55%|█████▍    | 12/22 [00:37<00:17,  1.75s/it, est. speed input: 358.50 toks/s, output: 137.86 toks/s]
Processed prompts:  59%|█████▉    | 13/22 [00:38<00:12,  1.38s/it, est. speed input: 383.05 toks/s, output: 157.59 toks/s]
Processed prompts:  64%|██████▎   | 14/22 [00:39<00:09,  1.15s/it, est. speed input: 405.98 toks/s, output: 177.04 toks/s]
Processed prompts:  68%|██████▊   | 15/22 [00:42<00:13,  1.97s/it, est. speed input: 395.70 toks/s, output: 184.68 toks/s]
Processed prompts:  73%|███████▎  | 16/22 [00:44<00:11,  1.83s/it, est. speed input: 407.65 toks/s, output: 200.53 toks/s]
Processed prompts:  77%|███████▋  | 17/22 [00:45<00:07,  1.51s/it, est. speed input: 426.00 toks/s, output: 222.03 toks/s]
Processed prompts:  82%|████████▏ | 18/22 [00:45<00:04,  1.21s/it, est. speed input: 445.98 toks/s, output: 244.63 toks/s]
Processed prompts:  86%|████████▋ | 19/22 [00:46<00:02,  1.04it/s, est. speed input: 466.90 toks/s, output: 268.05 toks/s]
Processed prompts:  91%|█████████ | 20/22 [00:48<00:02,  1.48s/it, est. speed input: 464.27 toks/s, output: 280.92 toks/s]
Processed prompts:  95%|█████████▌| 21/22 [00:48<00:01,  1.07s/it, est. speed input: 486.31 toks/s, output: 306.08 toks/s]
Processed prompts: 100%|██████████| 22/22 [00:53<00:00,  2.15s/it, est. speed input: 465.01 toks/s, output: 315.75 toks/s]
Processed prompts: 100%|██████████| 22/22 [00:53<00:00,  2.43s/it, est. speed input: 465.01 toks/s, output: 315.75 toks/s]
   [2/3] GPU 推理完成
   OCR 耗时: 60.07s
   [3/3] 后处理...
   [3/3] 后处理完成 (0.01s)
============================================================
[SUCCESS] 全部完成
   总耗时: 71.52s
   平均: 3.25s/页
============================================================

INFO:     127.0.0.1:52722 - "POST /ocr HTTP/1.1" 200 OK