Views
No views yet
1pip install git+https://github.com/lvliang-intel/vllm-omni.git@feats/ar-w4a16-bagel-mot
2pip install git+https://github.com/huggingface/transformers.git1CUDA_VISIBLE_DEVICES=0 vllm serve Intel/BAGEL-7B-MoT-int4-AutoRound --omni --port 8091
2
3curl -s http://127.0.0.1:8091/v1/chat/completions \
4 -H "Content-Type: application/json" \
5 -d '{
6 "messages": [
7 {"role": "user", "content": "A beautiful sunset over the ocean with sailing boats"}
8 ],
9 "extra_body": {
10 "height": 1024,
11 "width": 1024,
12 "num_inference_steps": 50,
13 "guidance_scale": 1.5,
14 "seed": 42
15 }
16 }' | jq -r '.choices[0].message.content[0].image_url.url' | cut -d',' -f2- | base64 -d > sunset.png
17
18IMG_B64=$(base64 -w0 sunset.png)
19
20curl -s http://localhost:8091/v1/chat/completions \
21 -H "Content-Type: application/json" \
22 -d @- <<EOF | jq -r '.choices[0].message.content[0].image_url.url' | cut -d',' -f2- | base64 -d > watercolor.png
23{
24 "messages": [{
25 "role": "user",
26 "content": [
27 {"type": "text", "text": "Convert this image to watercolor style"},
28 {"type": "image_url", "image_url": {"url": "data:image/png;base64,$IMG_B64"}}
29 ]
30 }],
31 "extra_body": {
32 "height": 1024,
33 "width": 1024
34 }
35}
36EOF1auto_round \
2 --model ByteDance-Seed/BAGEL-7B-MoT \
3 --output_dir tmp_bagel_mot_w4a16 \
4 --trust_remote_code