Skip to content

Commit

Permalink
Split up the code blocks
Browse files Browse the repository at this point in the history
Signed-off-by: DarkLight1337 <[email protected]>
  • Loading branch information
DarkLight1337 committed Dec 2, 2024
1 parent d4e3eb5 commit 449eef6
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions docs/source/usage/multimodal_inputs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,12 @@ pass a tensor of shape :code:`(num_items, feature_size, hidden_size of LM)` to t
generated_text = o.outputs[0].text
print(generated_text)
# Inference with image embeddings as input with additional parameters
# (Only available for specific models)
For Qwen2-VL and MiniCPM-V, we accept additional parameters alongside the embeddings:

# Construct the prompt based on your model (we omit it here)
.. code-block:: python
# Construct the prompt based on your model
prompt = ...
# Embeddings for multiple images
# torch.Tensor of shape (num_images, image_feature_size, hidden_size of LM)
Expand Down

0 comments on commit 449eef6

Please sign in to comment.