[Misc] Split up pooling tasks (#10820)
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
This commit is contained in:
@ -9,7 +9,12 @@ prompts = [
|
||||
]
|
||||
|
||||
# Create an LLM.
|
||||
model = LLM(model="intfloat/e5-mistral-7b-instruct", enforce_eager=True)
|
||||
model = LLM(
|
||||
model="intfloat/e5-mistral-7b-instruct",
|
||||
task="embed", # You should pass task="embed" for embedding models
|
||||
enforce_eager=True,
|
||||
)
|
||||
|
||||
# Generate embedding. The output is a list of PoolingRequestOutputs.
|
||||
outputs = model.encode(prompts)
|
||||
# Print the outputs.
|
||||
|
||||
@ -59,7 +59,7 @@ def run_e5_v(query: Query):
|
||||
|
||||
llm = LLM(
|
||||
model="royokong/e5-v",
|
||||
task="embedding",
|
||||
task="embed",
|
||||
max_model_len=4096,
|
||||
)
|
||||
|
||||
@ -88,7 +88,7 @@ def run_vlm2vec(query: Query):
|
||||
|
||||
llm = LLM(
|
||||
model="TIGER-Lab/VLM2Vec-Full",
|
||||
task="embedding",
|
||||
task="embed",
|
||||
trust_remote_code=True,
|
||||
mm_processor_kwargs={"num_crops": 4},
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user