Views
No views yet
q0f16.
The model can be used for projects MLC-LLM and WebLLM.mlc_llm chat HF://mlc-ai/Phi-3.5-vision-instruct-q0f16-MLCmlc_llm serve HF://mlc-ai/Phi-3.5-vision-instruct-q0f16-MLC1from mlc_llm import MLCEngine
2
3# Create engine
4model = "HF://mlc-ai/Phi-3.5-vision-instruct-q0f16-MLC"
5engine = MLCEngine(model)
6
7# Run chat completion in OpenAI API.
8for response in engine.chat.completions.create(
9 messages = [
10 {
11 "role": "user",
12 "content": [
13 {
14 "type": "image_url",
15 "image_url": "https://www.ilankelman.org/stopsigns/australia.jpg",
16 },
17 {
18 "type": "text",
19 "text": "Describe this image please."
20 },
21 ],
22 },
23 ],
24 model=model,
25 stream=True,
26):
27 for choice in response.choices:
28 print(choice.delta.content, end="", flush=True)
29print("\n")
30
31engine.terminate()