Run this model with HF Jobs
Run KamilaMila/FastVLM-7B on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/KamilaMila/FastVLM-7B. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/KamilaMila/FastVLM-7B on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/KamilaMila/FastVLM-7B. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/KamilaMila/FastVLM-7B. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use KamilaMila/FastVLM-7B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use KamilaMila/FastVLM-7B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="KamilaMila/FastVLM-7B") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("KamilaMila/FastVLM-7B") model = AutoModelForMultimodalLM.from_pretrained("KamilaMila/FastVLM-7B", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use KamilaMila/FastVLM-7B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "KamilaMila/FastVLM-7B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "KamilaMila/FastVLM-7B", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/KamilaMila/FastVLM-7B
- SGLang
How to use KamilaMila/FastVLM-7B with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "KamilaMila/FastVLM-7B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "KamilaMila/FastVLM-7B", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "KamilaMila/FastVLM-7B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "KamilaMila/FastVLM-7B", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use KamilaMila/FastVLM-7B with Docker Model Runner:
docker model run hf.co/KamilaMila/FastVLM-7B
Upload FastVlmForConditionalGeneration
Browse filesFiles changed (3)
72 unmodified lines73747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285372 unmodified lines"global_pool": "avg","hidden_size": 3072,"initializer_range": 0.02,"label_names": ["LABEL_0","LABEL_1","LABEL_2","LABEL_3","LABEL_4","LABEL_5","LABEL_6","LABEL_7","LABEL_8","LABEL_9","LABEL_10","LABEL_11","LABEL_12","LABEL_13","LABEL_14","LABEL_15","LABEL_16","LABEL_17","LABEL_18","LABEL_19","LABEL_20","LABEL_21","LABEL_22","LABEL_23","LABEL_24","LABEL_25","LABEL_26","LABEL_27","LABEL_28","LABEL_29","LABEL_30","LABEL_31","LABEL_32","LABEL_33","LABEL_34","LABEL_35","LABEL_36","LABEL_37","LABEL_38","LABEL_39","LABEL_40","LABEL_41","LABEL_42","LABEL_43","LABEL_44","LABEL_45","LABEL_46","LABEL_47","LABEL_48","LABEL_49","LABEL_50","LABEL_51","LABEL_52","LABEL_53","LABEL_54","LABEL_55","LABEL_56","LABEL_57","LABEL_58","LABEL_59","LABEL_60","LABEL_61","LABEL_62","LABEL_63","LABEL_64","LABEL_65","LABEL_66","LABEL_67","LABEL_68","LABEL_69","LABEL_70","LABEL_71","LABEL_72","LABEL_73","LABEL_74","LABEL_75","LABEL_76","LABEL_77","LABEL_78","LABEL_79","LABEL_80","LABEL_81","LABEL_82","LABEL_83","LABEL_84","LABEL_85","LABEL_86","LABEL_87","LABEL_88","LABEL_89","LABEL_90","LABEL_91","LABEL_92","LABEL_93","LABEL_94","LABEL_95","LABEL_96","LABEL_97","LABEL_98","LABEL_99","LABEL_100","LABEL_101","LABEL_102","LABEL_103","LABEL_104","LABEL_105","LABEL_106","LABEL_107","LABEL_108","LABEL_109","LABEL_110","LABEL_111","LABEL_112","LABEL_113","LABEL_114","LABEL_115","LABEL_116","LABEL_117","LABEL_118","LABEL_119","LABEL_120","LABEL_121","LABEL_122","LABEL_123","LABEL_124","LABEL_125","LABEL_126","LABEL_127","LABEL_128","LABEL_129","LABEL_130","LABEL_131","LABEL_132","LABEL_133","LABEL_134","LABEL_135","LABEL_136","LABEL_137","LABEL_138","LABEL_139","LABEL_140","LABEL_141","LABEL_142","LABEL_143","LABEL_144","LABEL_145","LABEL_146","LABEL_147","LABEL_148","LABEL_149","LABEL_150","LABEL_151","LABEL_152","LABEL_153","LABEL_154","LABEL_155","LABEL_156","LABEL_157","LABEL_158","LABEL_159","LABEL_160","LABEL_161","LABEL_162","LABEL_163","LABEL_164","LABEL_165","LABEL_166","LABEL_167","LABEL_168","LABEL_169","LABEL_170","LABEL_171","LABEL_172","LABEL_173","LABEL_174","LABEL_175","LABEL_176","LABEL_177","LABEL_178","LABEL_179","LABEL_180","LABEL_181","LABEL_182","LABEL_183","LABEL_184","LABEL_185","LABEL_186","LABEL_187","LABEL_188","LABEL_189","LABEL_190","LABEL_191","LABEL_192","LABEL_193","LABEL_194","LABEL_195","LABEL_196","LABEL_197","LABEL_198","LABEL_199","LABEL_200","LABEL_201","LABEL_202","LABEL_203","LABEL_204","LABEL_205","LABEL_206","LABEL_207","LABEL_208","LABEL_209","LABEL_210","LABEL_211","LABEL_212","LABEL_213","LABEL_214","LABEL_215","LABEL_216","LABEL_217","LABEL_218","LABEL_219","LABEL_220","LABEL_221","LABEL_222","LABEL_223","LABEL_224","LABEL_225","LABEL_226","LABEL_227","LABEL_228","LABEL_229","LABEL_230","LABEL_231","LABEL_232","LABEL_233","LABEL_234","LABEL_235","LABEL_236","LABEL_237","LABEL_238","LABEL_239","LABEL_240","LABEL_241","LABEL_242","LABEL_243","LABEL_244","LABEL_245","LABEL_246","LABEL_247","LABEL_248","LABEL_249","LABEL_250","LABEL_251","LABEL_252","LABEL_253","LABEL_254","LABEL_255","LABEL_256","LABEL_257","LABEL_258","LABEL_259","LABEL_260","LABEL_261","LABEL_262","LABEL_263","LABEL_264","LABEL_265","LABEL_266","LABEL_267","LABEL_268","LABEL_269","LABEL_270","LABEL_271","LABEL_272","LABEL_273","LABEL_274","LABEL_275","LABEL_276","LABEL_277","LABEL_278","LABEL_279","LABEL_280","LABEL_281","LABEL_282","LABEL_283","LABEL_284","LABEL_285","LABEL_286","LABEL_287","LABEL_288","LABEL_289","LABEL_290","LABEL_291","LABEL_292","LABEL_293","LABEL_294","LABEL_295","LABEL_296","LABEL_297","LABEL_298","LABEL_299","LABEL_300","LABEL_301","LABEL_302","LABEL_303","LABEL_304","LABEL_305","LABEL_306","LABEL_307","LABEL_308","LABEL_309","LABEL_310","LABEL_311","LABEL_312","LABEL_313","LABEL_314","LABEL_315","LABEL_316","LABEL_317","LABEL_318","LABEL_319","LABEL_320","LABEL_321","LABEL_322","LABEL_323","LABEL_324","LABEL_325","LABEL_326","LABEL_327","LABEL_328","LABEL_329","LABEL_330","LABEL_331","LABEL_332","LABEL_333","LABEL_334","LABEL_335","LABEL_336","LABEL_337","LABEL_338","LABEL_339","LABEL_340","LABEL_341","LABEL_342","LABEL_343","LABEL_344","LABEL_345","LABEL_346","LABEL_347","LABEL_348","LABEL_349","LABEL_350","LABEL_351","LABEL_352","LABEL_353","LABEL_354","LABEL_355","LABEL_356","LABEL_357","LABEL_358","LABEL_359","LABEL_360","LABEL_361","LABEL_362","LABEL_363","LABEL_364","LABEL_365","LABEL_366","LABEL_367","LABEL_368","LABEL_369","LABEL_370","LABEL_371","LABEL_372","LABEL_373","LABEL_374","LABEL_375","LABEL_376","LABEL_377","LABEL_378","LABEL_379","LABEL_380","LABEL_381","LABEL_382","LABEL_383","LABEL_384","LABEL_385","LABEL_386","LABEL_387","LABEL_388","LABEL_389","LABEL_390","LABEL_391","LABEL_392","LABEL_393","LABEL_394","LABEL_395","LABEL_396","LABEL_397","LABEL_398","LABEL_399","LABEL_400","LABEL_401","LABEL_402","LABEL_403","LABEL_404","LABEL_405","LABEL_406","LABEL_407","LABEL_408","LABEL_409","LABEL_410","LABEL_411","LABEL_412","LABEL_413","LABEL_414","LABEL_415","LABEL_416","LABEL_417","LABEL_418","LABEL_419","LABEL_420","LABEL_421","LABEL_422","LABEL_423","LABEL_424","LABEL_425","LABEL_426","LABEL_427","LABEL_428","LABEL_429","LABEL_430","LABEL_431","LABEL_432","LABEL_433","LABEL_434","LABEL_435","LABEL_436","LABEL_437","LABEL_438","LABEL_439","LABEL_440","LABEL_441","LABEL_442","LABEL_443","LABEL_444","LABEL_445","LABEL_446","LABEL_447","LABEL_448","LABEL_449","LABEL_450","LABEL_451","LABEL_452","LABEL_453","LABEL_454","LABEL_455","LABEL_456","LABEL_457","LABEL_458","LABEL_459","LABEL_460","LABEL_461","LABEL_462","LABEL_463","LABEL_464","LABEL_465","LABEL_466","LABEL_467","LABEL_468","LABEL_469","LABEL_470","LABEL_471","LABEL_472","LABEL_473","LABEL_474","LABEL_475","LABEL_476","LABEL_477","LABEL_478","LABEL_479","LABEL_480","LABEL_481","LABEL_482","LABEL_483","LABEL_484","LABEL_485","LABEL_486","LABEL_487","LABEL_488","LABEL_489","LABEL_490","LABEL_491","LABEL_492","LABEL_493","LABEL_494","LABEL_495","LABEL_496","LABEL_497","LABEL_498","LABEL_499","LABEL_500","LABEL_501","LABEL_502","LABEL_503","LABEL_504","LABEL_505","LABEL_506","LABEL_507","LABEL_508","LABEL_509","LABEL_510","LABEL_511","LABEL_512","LABEL_513","LABEL_514","LABEL_515","LABEL_516","LABEL_517","LABEL_518","LABEL_519","LABEL_520","LABEL_521","LABEL_522","LABEL_523","LABEL_524","LABEL_525","LABEL_526","LABEL_527","LABEL_528","LABEL_529","LABEL_530","LABEL_531","LABEL_532","LABEL_533","LABEL_534","LABEL_535","LABEL_536","LABEL_537","LABEL_538","LABEL_539","LABEL_540","LABEL_541","LABEL_542","LABEL_543","LABEL_544","LABEL_545","LABEL_546","LABEL_547","LABEL_548","LABEL_549","LABEL_550","LABEL_551","LABEL_552","LABEL_553","LABEL_554","LABEL_555","LABEL_556","LABEL_557","LABEL_558","LABEL_559","LABEL_560","LABEL_561","LABEL_562","LABEL_563","LABEL_564","LABEL_565","LABEL_566","LABEL_567","LABEL_568","LABEL_569","LABEL_570","LABEL_571","LABEL_572","LABEL_573","LABEL_574","LABEL_575","LABEL_576","LABEL_577","LABEL_578","LABEL_579","LABEL_580","LABEL_581","LABEL_582","LABEL_583","LABEL_584","LABEL_585","LABEL_586","LABEL_587","LABEL_588","LABEL_589","LABEL_590","LABEL_591","LABEL_592","LABEL_593","LABEL_594","LABEL_595","LABEL_596","LABEL_597","LABEL_598","LABEL_599","LABEL_600","LABEL_601","LABEL_602","LABEL_603","LABEL_604","LABEL_605","LABEL_606","LABEL_607","LABEL_608","LABEL_609","LABEL_610","LABEL_611","LABEL_612","LABEL_613","LABEL_614","LABEL_615","LABEL_616","LABEL_617","LABEL_618","LABEL_619","LABEL_620","LABEL_621","LABEL_622","LABEL_623","LABEL_624","LABEL_625","LABEL_626","LABEL_627","LABEL_628","LABEL_629","LABEL_630","LABEL_631","LABEL_632","LABEL_633","LABEL_634","LABEL_635","LABEL_636","LABEL_637","LABEL_638","LABEL_639","LABEL_640","LABEL_641","LABEL_642","LABEL_643","LABEL_644","LABEL_645","LABEL_646","LABEL_647","LABEL_648","LABEL_649","LABEL_650","LABEL_651","LABEL_652","LABEL_653","LABEL_654","LABEL_655","LABEL_656","LABEL_657","LABEL_658","LABEL_659","LABEL_660","LABEL_661","LABEL_662","LABEL_663","LABEL_664","LABEL_665","LABEL_666","LABEL_667","LABEL_668","LABEL_669","LABEL_670","LABEL_671","LABEL_672","LABEL_673","LABEL_674","LABEL_675","LABEL_676","LABEL_677","LABEL_678","LABEL_679","LABEL_680","LABEL_681","LABEL_682","LABEL_683","LABEL_684","LABEL_685","LABEL_686","LABEL_687","LABEL_688","LABEL_689","LABEL_690","LABEL_691","LABEL_692","LABEL_693","LABEL_694","LABEL_695","LABEL_696","LABEL_697","LABEL_698","LABEL_699","LABEL_700","LABEL_701","LABEL_702","LABEL_703","LABEL_704","LABEL_705","LABEL_706","LABEL_707","LABEL_708","LABEL_709","LABEL_710","LABEL_711","LABEL_712","LABEL_713","LABEL_714","LABEL_715","LABEL_716","LABEL_717","LABEL_718","LABEL_719","LABEL_720","LABEL_721","LABEL_722","LABEL_723","LABEL_724","LABEL_725","LABEL_726","LABEL_727","LABEL_728","LABEL_729","LABEL_730","LABEL_731","LABEL_732","LABEL_733","LABEL_734","LABEL_735","LABEL_736","LABEL_737","LABEL_738","LABEL_739","LABEL_740","LABEL_741","LABEL_742","LABEL_743","LABEL_744","LABEL_745","LABEL_746","LABEL_747","LABEL_748","LABEL_749","LABEL_750","LABEL_751","LABEL_752","LABEL_753","LABEL_754","LABEL_755","LABEL_756","LABEL_757","LABEL_758","LABEL_759","LABEL_760","LABEL_761","LABEL_762","LABEL_763","LABEL_764","LABEL_765","LABEL_766","LABEL_767"],"model_args": {"inference_mode": true},"model_type": "timm_wrapper","num_classes": 768,"num_features": 3072,"pretrained_cfg": {"classifier": "head.fc",72 unmodified lines73747576777879808182838472 unmodified lines"global_pool": "avg","hidden_size": 3072,"initializer_range": 0.02,"label_names": [],"model_args": {"inference_mode": true},"model_type": "timm_wrapper","num_classes": 0,"num_features": 3072,"pretrained_cfg": {"classifier": "head.fc",
123version https://git-lfs.github.com/spec/v1oid sha256:6ffbb9c121a695f1d986f939f1f803292c559518c9ab5cad61d7be61499254fdsize 4976900000123version https://git-lfs.github.com/spec/v1oid sha256:45193d09619c3f4c49c0a89de2b875282cea75983d9783742d3d544097817042size 4976900000
123version https://git-lfs.github.com/spec/v1oid sha256:9602c6f9f353a3f58897ff9e4a236c9900ce1abf171bd3ea5e1bb9ff2b75a90esize 1090453632123version https://git-lfs.github.com/spec/v1oid sha256:433219428b9248bec7f953d4e85f06e2499c883900729b082b4771dd8e291964size 1090453632
config.json+2-771
model-00001-of-00004.safetensors+1-1
model-00004-of-00004.safetensors+1-1