lfm3: add INT4, FP8 per-channel and VL notes, tests, eval and results
Sync the repo with the working directory: full NOTES.md (rounds 4-5, LFM3-VL), VL tests and test images, quality eval, AutoRound W4A16 quantization scripts and calibration recipe, the variant.sh MODEL/DOCKER_ENV options, and the remaining benchmark results. Large regenerable artifacts (INT4 checkpoint, ref_vl.pt, raw logprob dumps) stay out. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
0412bb1f72
commit
1834792bb8
67 files changed
+119589
-9
No files matched your search
@@ -0,0 +1,16 @@
|
||||
import sys
|
||||
from PIL import Image
|
||||
from vllm import LLM, SamplingParams
|
||||
|
||||
def main():
|
||||
llm = LLM(model="/vl", dtype="bfloat16", max_model_len=8192, gpu_memory_utilization=0.4,
|
||||
limit_mm_per_prompt={"image": 4}, enforce_eager=True)
|
||||
msgs = [{"role": "user", "content": [{"type": "image_pil", "image_pil": Image.open("/tests/vl/images/photo.jpeg").convert("RGB")},
|
||||
{"type": "text", "text": "What newspaper is this?"}]}]
|
||||
o = llm.chat(msgs, SamplingParams(max_tokens=80, temperature=0.0))[0]
|
||||
print("PROMPT_LEN", len(o.prompt_token_ids), "IMG_TOK", o.prompt_token_ids.count(125030))
|
||||
print("OUT", repr(o.outputs[0].text))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in new issue
Block a user