ewin-reg commited on
Commit
532a4d3
·
verified ·
1 Parent(s): 6baf351

fix: decode outputs[0] directly — generate() returns only new tokens, not full sequence

Browse files
Files changed (1) hide show
  1. README.md +2 -2
README.md CHANGED
@@ -15,7 +15,7 @@ tags:
15
  - table-extraction
16
  ---
17
 
18
- # MiniCPM5-Vision-2B (Unofficial): High-Resolution Vision, Dense OCR & Table Foundation Model
19
 
20
  MiniCPM5-Vision-2B is an omni-modal vision-language foundation model built on the dense language backbone [openbmb/MiniCPM5-2B](https://huggingface.co/openbmb/MiniCPM5-2B) (2.0 billion parameters, 131,072 token context length) coupled to a SigLIP vision backbone (`google/siglip-so400m-patch14-384`) through a learned 2x2 spatial unshuffle projection bridge.
21
 
@@ -146,7 +146,7 @@ with torch.no_grad():
146
  pad_token_id=tokenizer.eos_token_id
147
  )
148
 
149
- response = tokenizer.decode(outputs[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True)
150
  print(response)
151
  ```
152
 
 
15
  - table-extraction
16
  ---
17
 
18
+ # MiniCPM5-Vision-2B: High-Resolution Vision, Dense OCR & Table Foundation Model
19
 
20
  MiniCPM5-Vision-2B is an omni-modal vision-language foundation model built on the dense language backbone [openbmb/MiniCPM5-2B](https://huggingface.co/openbmb/MiniCPM5-2B) (2.0 billion parameters, 131,072 token context length) coupled to a SigLIP vision backbone (`google/siglip-so400m-patch14-384`) through a learned 2x2 spatial unshuffle projection bridge.
21
 
 
146
  pad_token_id=tokenizer.eos_token_id
147
  )
148
 
149
+ response = tokenizer.decode(outputs[0], skip_special_tokens=True)
150
  print(response)
151
  ```
152