Video-Text-to-Text
Transformers
Safetensors
English
KeyeVL1_5
feature-extraction
multimodal
custom_code
Eval Results
Run this model with HF Jobs
Run Kling-Keye-Official/Keye-VL-1_5-8B 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 to fine-tune https://huggingface.co/Kling-Keye-Official/Keye-VL-1_5-8B. 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/Kling-Keye-Official/Keye-VL-1_5-8B 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.
Instructions to use Kling-Keye-Official/Keye-VL-1_5-8B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Kling-Keye-Official/Keye-VL-1_5-8B with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Kling-Keye-Official/Keye-VL-1_5-8B", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Kwai-Keye commited on
Update model files
Browse filesFiles changed (19)
- .gitattributes+9
- README.md+500-7
- asset/.DS_StoreAdded
- asset/architecture.pngAdded
- asset/keye_logo_2.pngAdded
- asset/keyelogo/Keye-logo--black.pngAdded
- asset/keyelogo/Keye-logo--white.pngAdded
- asset/keyelogo/Keye-logo.pngAdded
- asset/performance.pngAdded
- asset/post1.jpegAdded
- asset/post1.pngAdded
- asset/post2.jpegAdded
- asset/post2.pngAdded
- asset/pre-train.pngAdded
- asset/teaser.pngAdded
- configuration_keye_vl_1_5.py+1-1
- image_processing_keye_vl_1_5.py+1-1
- modeling_keye_vl_1_5.py+16-6
- processing_keye_vl_1_5.py+1-1
33 unmodified lines34353633 unmodified lines*.zst filter=lfs diff=lfs merge=lfs -text*tfevents* filter=lfs diff=lfs merge=lfs -texttokenizer.json filter=lfs diff=lfs merge=lfs -text33 unmodified lines34353637383940414243444533 unmodified lines*.zst filter=lfs diff=lfs merge=lfs -text*tfevents* filter=lfs diff=lfs merge=lfs -texttokenizer.json filter=lfs diff=lfs merge=lfs -textasset/architecture.png filter=lfs diff=lfs merge=lfs -textasset/keye_logo_2.png filter=lfs diff=lfs merge=lfs -textasset/keyelogo/Keye-logo--black.png filter=lfs diff=lfs merge=lfs -textasset/keyelogo/Keye-logo--white.png filter=lfs diff=lfs merge=lfs -textasset/keyelogo/Keye-logo.png filter=lfs diff=lfs merge=lfs -textasset/performance.png filter=lfs diff=lfs merge=lfs -textasset/post2.jpeg filter=lfs diff=lfs merge=lfs -textasset/pre-train.png filter=lfs diff=lfs merge=lfs -textasset/teaser.png filter=lfs diff=lfs merge=lfs -text
1234567---license: apache-2.0language:- zh- enpipeline_tag: image-text-to-text---123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500# Kwai Keye-VL<div align="center"><img src="asset/keye_logo_2.png" width="100%" alt="Kwai Keye-VL Logo"></div><font size=7><div align='center' >[[🍎 Home Page](https://kwai-keye.github.io/)][[📖 Technique Report](https://arxiv.org/abs/2507.01949)][[📊 Keye-VL-8B-Preview](https://huggingface.co/Kwai-Keye/Keye-VL-8B-Preview) ][[📊 Keye-VL-1.5-8B](https://huggingface.co/Kwai-Keye/Keye-VL-1.5-8B/) ][[🚀 Demo](https://huggingface.co/spaces/Kwai-Keye/Keye-VL-8B-Preview)]</div></font>## 🔥 News* **`2025.08.28`** 🌟 We are excited to introduce **Kwai Keye-VL-1.5**, a more powerful version! By incorporating innovative `Slow-Fast Video Encoding strategy`, `new LongCoT Cold-Start data pipeline`, and `advanced RL training strategies`, Keye-VL-1.5 reaches new heights in video understanding, image comprehension, and reasoning capabilities. Plus, it now supports an extended context length of up to **128k** tokens for handling longer conversations and complex tasks. Stay tuned for more groundbreaking innovations!* **`2025.07.08`** 🌟 Keye-VL is supported by [swift](https://github.com/modelscope/ms-swift) and [vLLM](https://github.com/vllm-project/vllm). Feel free to use it without hesitation!* **`2025.07.03`** 🌟 We are excited to announce the release of our comprehensive technical report! You can read it now at [arxiv](https://arxiv.org/abs/2507.01949).* **`2025.06.26`** 🌟 We are very proud to launch **Kwai Keye-VL**, a cutting-edge multimodal large language model meticulously crafted by the **Kwai Keye Team** at [Kuaishou](https://www.kuaishou.com/). As a cornerstone AI product within Kuaishou's advanced technology ecosystem, Keye excels in video understanding, visual perception, and reasoning tasks, setting new benchmarks in performance. Our team is working tirelessly to push the boundaries of what's possible, so stay tuned for more exciting updates!<div align="center"><img src="asset/teaser.png" width="100%" alt="Kwai Keye-VL Performance"></div>## Contents <!-- omit in toc -->- [🔥 News](#-news)- [📐 Quick Start](#-quick-start)- [Preprocess and Inference](#preprocess-and-inference)- [Evaluation](#evaluation)- [👀 Architecture and Training Strategy](#-architecture-and-training-strategy)- [🌟 Pre-Train](#-pre-train)- [🌟 Post-Train](#-post-train)- [📈 Experimental Results](#-experimental-results)- [✒️ Citation](#️-citation)## 📐 Quick Start### Preprocess and InferenceSee [keye-vl-utils/README.md](keye-vl-utils/README.md) for details. ```Keye-vl-utils``` contains a set of helper functions for processing and integrating visual language information with Keye Series Model.#### Install```bashpip install --upgrade keye-vl-utils==1.5.2 -i https://pypi.org/simple```#### Keye-VL-1.5 Inference```pythonfrom transformers import AutoModel, AutoTokenizer, AutoProcessorfrom keye_vl_utils import process_vision_info# default: Load the model on the available device(s)model_path = "Kwai-Keye/Keye-VL-1.5-8B"model = AutoModel.from_pretrained(model_path,torch_dtype="auto",trust_remote_code=True,# flash_attention_2 is recommended for better performanceattn_implementation="flash_attention_2",).eval()model.to("cuda")processor = AutoProcessor.from_pretrained(model_path, trust_remote_code=True)# Image Inputs## Non-Thinking Modemessages = [{"role": "user","content": [{"type": "image","image": "https://s1-11508.kwimgs.com/kos/nlav11508/mllm_all/ziran_jiafeimao_11.jpg",},{"type": "text", "text": "Describe this image./no_think"},],}]## Auto-Thinking Modemessages = [{"role": "user","content": [{"type": "image","image": "https://s1-11508.kwimgs.com/kos/nlav11508/mllm_all/ziran_jiafeimao_11.jpg",},{"type": "text", "text": "Describe this image."},],}]## Thinking modemessages = [{"role": "user","content": [{"type": "image","image": "https://s1-11508.kwimgs.com/kos/nlav11508/mllm_all/ziran_jiafeimao_11.jpg",},{"type": "text", "text": "Describe this image./think"},],}]# The default range for the number of visual tokens per image in the model is 4-20480.# You can set min_pixels and max_pixels according to your needs, such as a token range of 32-1280, to balance performance and cost.# min_pixels = 32 * 28 * 28# max_pixels = 1280 * 28 * 28# e.g.,messages = [{"role": "user","content": [{"type": "image","image": "https://s1-11508.kwimgs.com/kos/nlav11508/mllm_all/ziran_jiafeimao_11.jpg","min_pixels": 32 * 28 * 28,"max_pixels": 1280 * 28 * 28},{"type": "text", "text": "Describe this image./think"},],}]# Video inputsmessages = [{"role": "user","content": [{"type": "video","video": "http://s2-11508.kwimgs.com/kos/nlav11508/MLLM/videos_caption/98312843263.mp4",},{"type": "text", "text": "Describe this video."},],}]# You can also set fps and max_frames to restrict total frames send to model.# e.g.,messages = [{"role": "user","content": [{"type": "video","video": "http://s2-11508.kwimgs.com/kos/nlav11508/MLLM/videos_caption/98312843263.mp4","fps": 2.0,"max_frames": 1024},{"type": "text", "text": "Describe this video."},],}]# Text inputsmessages = [{"role": "user","content": "Hello, Keye",}]# Preparation for inferencetext = processor.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)image_inputs, video_inputs, mm_processor_kwargs = process_vision_info(messages)inputs = processor(text=[text],images=image_inputs,videos=video_inputs,padding=True,return_tensors="pt",**mm_processor_kwargs)inputs = inputs.to("cuda")# Inference: Generation of the outputgenerated_ids = model.generate(**inputs, max_new_tokens=1024)generated_ids_trimmed = [out_ids[len(in_ids) :] for in_ids, out_ids in zip(inputs.input_ids, generated_ids)]output_text = processor.batch_decode(generated_ids_trimmed, skip_special_tokens=True, clean_up_tokenization_spaces=False)print(output_text)```#### Deployment- We recommend using vLLM for fast deployment and inference.##### Install```bashpip install keye-vl-utils==1.5.2 "vllm>=0.9.2"```##### Offline Inference```bash# refer to https://github.com/QwenLM/Qwen2.5-VL?tab=readme-ov-file#inference-locallyfrom transformers import AutoProcessorfrom vllm import LLM, SamplingParamsfrom keye_vl_utils import process_vision_infomodel_path = "/hetu_group/jky/playground_hhd_2/2025/20250626_keye/Keye-VL-8B-Preview"llm = LLM(model=model_path,limit_mm_per_prompt={"image": 10, "video": 10},trust_remote_code=True,)sampling_params = SamplingParams(temperature=0.3,max_tokens=256,)# imageimage_messages = [{"role": "user","content": [{"type": "image","image": "https://s1-11508.kwimgs.com/kos/nlav11508/mllm_all/ziran_jiafeimao_11.jpg",},{"type": "text", "text": "Describe this image./think"},],},]# videovideo_messages = [{"role": "user","content": [{"type": "video","video": "http://s2-11508.kwimgs.com/kos/nlav11508/MLLM/videos_caption/98312843263.mp4",},{"type": "text", "text": "Describe this video./think"},],},]# Here we use video messages as a demonstrationmessages = video_messagesprocessor = AutoProcessor.from_pretrained(model_path, trust_remote_code=True)prompt = processor.apply_chat_template(messages,tokenize=False,add_generation_prompt=True,)image_inputs, video_inputs, video_kwargs = process_vision_info(messages, return_video_kwargs=True)mm_data = {}if image_inputs is not None:mm_data["image"] = image_inputsif video_inputs is not None:mm_data["video"] = video_inputsllm_inputs = {"prompt": prompt,"multi_modal_data": mm_data,# FPS will be returned in video_kwargs"mm_processor_kwargs": video_kwargs,}outputs = llm.generate([llm_inputs], sampling_params=sampling_params)generated_text = outputs[0].outputs[0].textprint(generated_text)```##### Online Serving- Serve```bashvllm serve \Kwai-Keye/Keye-VL-8B-Preview \--tensor-parallel-size 8 \--enable-prefix-caching \--gpu-memory-utilization 0.8 \--host 0.0.0.0 \--port 8000 \--trust-remote-code```- Openai Chat Completion Client```pythonimport base64import numpy as npfrom PIL import Imagefrom io import BytesIOfrom openai import OpenAIfrom keye_vl_utils import process_vision_infoimport requests# Set OpenAI's API key and API base to use vLLM's API server.openai_api_key = "EMPTY"openai_api_base = "http://localhost:8000/v1"client = OpenAI(api_key=openai_api_key,base_url=openai_api_base,)# image urlimage_messages = [{"role": "user","content": [{"type": "image_url","image_url": {"url": "https://s1-11508.kwimgs.com/kos/nlav11508/mllm_all/ziran_jiafeimao_11.jpg"},},{"type": "text", "text": "Describe this image./think"},],},]chat_response = client.chat.completions.create(model="Kwai-Keye/Keye-VL-8B-Preview",messages=image_messages,)print("Chat response:", chat_response)# image base64-encodedimport base64image_path = "/path/to/local/image.png"with open(image_path, "rb") as f:encoded_image = base64.b64encode(f.read())encoded_image_text = encoded_image.decode("utf-8")image_messages = [{"role": "user","content": [{"type": "image_url","image_url": {"url": f"data:image;base64,{encoded_image_text}"},},{"type": "text", "text": "Describe this image./think"},],},]chat_response = client.chat.completions.create(model="Kwai-Keye/Keye-VL-8B-Preview",messages=image_messages,)print("Chat response:", chat_response)# video, refer to https://github.com/QwenLM/Qwen2.5-VL?tab=readme-ov-file#start-an-openai-api-servicevideo_messages = [{"role": "user", "content": [{"type": "video", "video": "http://s2-11508.kwimgs.com/kos/nlav11508/MLLM/videos_caption/98312843263.mp4"},{"type": "text", "text": "Describe this video./think"}]},]def prepare_message_for_vllm(content_messages):vllm_messages, fps_list = [], []for message in content_messages:message_content_list = message["content"]if not isinstance(message_content_list, list):vllm_messages.append(message)continuenew_content_list = []for part_message in message_content_list:if 'video' in part_message:video_message = [{'content': [part_message]}]image_inputs, video_inputs, video_kwargs = process_vision_info(video_message, return_video_kwargs=True)assert video_inputs is not None, "video_inputs should not be None"video_input = (video_inputs.pop()).permute(0, 2, 3, 1).numpy().astype(np.uint8)fps_list.extend(video_kwargs.get('fps', []))# encode image with base64base64_frames = []for frame in video_input:img = Image.fromarray(frame)output_buffer = BytesIO()img.save(output_buffer, format="jpeg")byte_data = output_buffer.getvalue()base64_str = base64.b64encode(byte_data).decode("utf-8")base64_frames.append(base64_str)part_message = {"type": "video_url","video_url": {"url": f"data:video/jpeg;base64,{','.join(base64_frames)}"}}new_content_list.append(part_message)message["content"] = new_content_listvllm_messages.append(message)return vllm_messages, {'fps': fps_list}video_messages, video_kwargs = prepare_message_for_vllm(video_messages)chat_response = client.chat.completions.create(model="Kwai-Keye/Keye-VL-8B-Preview",messages=video_messages,max_tokens=128,extra_body={"mm_processor_kwargs": video_kwargs})print("Chat response:", chat_response)```### EvaluationSee [evaluation/KC-MMBench/README.md](evaluation/KC-MMBench/README.md) for details.## 👀 Architecture and Training Strategy<div align="center"><img src="asset/architecture.png" width="100%" alt="Kwai Keye Architecture"><i> The Kwai Keye-VL-1.5 model architecture is based on the Qwen3-8B language model and incorporates a vision encoder initialized from the open-source SigLIP. It supports SlowFast video encoding and native dynamic resolution, preserving the original aspect ratio of images by dividing each into a 14x14 patch sequence. A simple MLP layer then maps and merges the visual tokens. The model uses 3D RoPE for unified processing of text, image, and video information.</i></div>### 🌟 Pre-Train<div align="center"><img src="https://github.com/user-attachments/assets/83db5863-1227-435c-9e70-be8a18319a67" width="100%" alt="Kwai Keye Pretraining"><i> A SlowFast video (generated by Kling) encoding demonstration: the Slow processes a smaller number of frames at higher resolution, while the Fast handles more frames at lower resolution.</i></div>### 🌟 Post-Train<div align="center"><img src="https://github.com/user-attachments/assets/2c529a7d-7e18-4c3f-bafc-cb29fed8ff3b" width="100%" alt="Post-Training Pipeline"><br><i>The post-training process includes non-reasoning stage and reasoning stage. The non-reasoning stage is composed of SFT and MPO training. The reasoning stage consists of three key steps: CoT Cold Start (we construct a five-step construction pipeline to generate high-quality CoT Cold-Start Dataset and apply model merging to refine model performance), General RL (we concentrate on improving Keye-VL-1.5's reasoning ability, applying GSPO, we propose progressive hint sampling to fully take advantage of hard problems and iteratively improve the cold-start and general RL model), and Alignment RL (improving Keye-VL-1.5's instruction following, format adherence, preference alignment and RAG ability with our reward system, we construct instruction following data, reasoning data and RAG data for RL training in this step).</i></div>## 📈 Experimental Results<div align="center"><img src="https://github.com/user-attachments/assets/76771d48-cd95-4782-b592-71f94160d9f1" width="100%" alt="Kwai Keye-VL-1.5 Performance"></div>1. Keye-VL-1.5-8B establishes itself with powerful, state-of-the-art perceptual abilities that are competitive with leading models.2. Keye-VL-1.5-8B demonstrates exceptional proficiency in video understanding. Across a comprehensive suite of authoritative public video benchmarks, including Video-MME, Video-MMMU, TempCompass, LongVideoBench, and MMVU, the model's performance significantly surpasses that of other top-tier models of a comparable size.3. In evaluation sets that require complex logical reasoning and mathematical problem-solving, such as WeMath, MathVerse, and LogicVista, Kwai Keye-VL-1.5-8B displays a strong performance curve. This highlights its advanced capacity for logical deduction and solving complex quantitative problems.## ✒️ CitationIf you find our work helpful for your research, please consider citing our work.```bibtex@misc{Keye-VL-1.5,title={Kwai Keye-VL-1.5 Technical Report},author={Kwai Keye Team},year={2025},eprint={TBD},}@misc{kwaikeyeteam2025kwaikeyevltechnicalreport,title={Kwai Keye-VL Technical Report},author={Kwai Keye Team},year={2025},eprint={2507.01949},archivePrefix={arXiv},primaryClass={cs.CV},url={https://arxiv.org/abs/2507.01949},}```## AcknowledgementKwai Keye-VL is developed based on the codebases of the following projects: [SigLIP](https://huggingface.co/google/siglip-so400m-patch14-384), [Qwen3](https://github.com/QwenLM/Qwen3), [Qwen2.5-VL](https://github.com/QwenLM/Qwen2.5-VL), [VLMEvalKit](https://github.com/open-compass/VLMEvalKit). We sincerely thank these projects for their outstanding work.
12345# coding=utf-8# Copyright 2025 The Keye Team and The HuggingFace Inc. team. All rights reserved.## This code is based on EleutherAI's GPT-NeoX library and the GPT-NeoX# and OPT implementations in this library. It has been modified from its12345# coding=utf-8# Copyright 2025 The Kwai Keye Team and The HuggingFace Inc. team. All rights reserved.## This code is based on EleutherAI's GPT-NeoX library and the GPT-NeoX# and OPT implementations in this library. It has been modified from its
12345# coding=utf-8# Copyright 2024 The Keye team, Alibaba Group and the HuggingFace Inc. team. All rights reserved.## This code is based on EleutherAI's GPT-NeoX library and the GPT-NeoX# and OPT implementations in this library. It has been modified from its12345# coding=utf-8# Copyright 2024 The Kwai Keye team, and the HuggingFace Inc. team. All rights reserved.## This code is based on EleutherAI's GPT-NeoX library and the GPT-NeoX# and OPT implementations in this library. It has been modified from its
12345460 unmodified lines4664674684694704711177 unmodified lines1649165016511652165316541655165682 unmodified lines173917401741174217431744174512 unmodified lines1758175917601761176217631764690 unmodified lines2455245624572458245924602461# coding=utf-8# Copyright 2025 The Keye Team and The HuggingFace Inc. team. All rights reserved.## This code is based on EleutherAI's GPT-NeoX library and the GPT-NeoX# and OPT implementations in this library. It has been modified from its460 unmodified linesvalues = values.transpose(1, 2)if not use_flash_attn:attention_interface: Callable = eager_attention_forwardif self.config._attn_implementation != "eager":if self.config._attn_implementation == "sdpa" and output_attentions:1177 unmodified linesclass KeyeVL1_5SdpaAttention(KeyeVL1_5Attention):"""Qwen3 attention module using torch.nn.functional.scaled_dot_product_attention. This module inherits from`Qwen3Attention` as the weights of the module stays untouched. The only changes are on the forward pass to adapt toSDPA API."""82 unmodified linesQWEN3_ATTENTION_CLASSES = {"eager": KeyeVL1_5Attention,"flash_attention_2": KeyeVL1_5FlashAttention2,"sdpa": KeyeVL1_5SdpaAttention,12 unmodified lines)# config._attn_implementation = "eager"# assert config._attn_implementation == "flash_attention_2", f"config._attn_implementation is {config._attn_implementation}"self.self_attn = QWEN3_ATTENTION_CLASSES[config._attn_implementation](config, layer_idx)self.mlp = Qwen3MLP(config)self.input_layernorm = Qwen3RMSNorm(config.hidden_size, eps=config.rms_norm_eps)self.post_attention_layernorm = Qwen3RMSNorm(config.hidden_size, eps=config.rms_norm_eps)690 unmodified linesreturn_dict = return_dict if return_dict is not None else self.config.use_return_dictspatial_merge_size = self.config.vision_config.spatial_merge_sizeif inputs_embeds is None:inputs_embeds = self.model.embed_tokens(input_ids)if pixel_values is not None:12345460 unmodified lines4664674684694704714724734744754761177 unmodified lines1654165516561657165816591660166182 unmodified lines174417451746174717481749175012 unmodified lines1763176417651766176717681769177017711772177317741775690 unmodified lines246624672468246924702471# coding=utf-8# Copyright 2025 The Kwai Keye Team and The HuggingFace Inc. team. All rights reserved.## This code is based on EleutherAI's GPT-NeoX library and the GPT-NeoX# and OPT implementations in this library. It has been modified from its460 unmodified linesvalues = values.transpose(1, 2)if not use_flash_attn:logger.warning_once("Flash attention is not enabled, which may impact performance. ""Consider using `attn_implementation='flash_attention_2'` when loading the model ""for better performance.")attention_interface: Callable = eager_attention_forwardif self.config._attn_implementation != "eager":if self.config._attn_implementation == "sdpa" and output_attentions:1177 unmodified linesclass KeyeVL1_5SdpaAttention(KeyeVL1_5Attention):"""KeyeVL1_5 attention module using torch.nn.functional.scaled_dot_product_attention. This module inherits from`KeyeVL1_5Attention` as the weights of the module stays untouched. The only changes are on the forward pass to adapt toSDPA API."""82 unmodified linesATTENTION_CLASSES = {"eager": KeyeVL1_5Attention,"flash_attention_2": KeyeVL1_5FlashAttention2,"sdpa": KeyeVL1_5SdpaAttention,12 unmodified lines)# config._attn_implementation = "eager"# assert config._attn_implementation == "flash_attention_2", f"config._attn_implementation is {config._attn_implementation}"self.self_attn = ATTENTION_CLASSES[config._attn_implementation](config, layer_idx)if not config._attn_implementation == "flash_attention_2":logger.warning_once("Flash attention is not enabled, which may impact performance. ""Consider using `attn_implementation='flash_attention_2'` when loading the model ""for better performance.")self.mlp = Qwen3MLP(config)self.input_layernorm = Qwen3RMSNorm(config.hidden_size, eps=config.rms_norm_eps)self.post_attention_layernorm = Qwen3RMSNorm(config.hidden_size, eps=config.rms_norm_eps)690 unmodified linesreturn_dict = return_dict if return_dict is not None else self.config.use_return_dictspatial_merge_size = self.config.vision_config.spatial_merge_sizeif inputs_embeds is None:inputs_embeds = self.model.embed_tokens(input_ids)if pixel_values is not None:
12345# coding=utf-8# Copyright 2025 The Keye Team and The HuggingFace Inc. team. All rights reserved.## This code is based on EleutherAI's GPT-NeoX library and the GPT-NeoX# and OPT implementations in this library. It has been modified from its12345# coding=utf-8# Copyright 2025 The Kwai Keye Team and The HuggingFace Inc. team. All rights reserved.## This code is based on EleutherAI's GPT-NeoX library and the GPT-NeoX# and OPT implementations in this library. It has been modified from its
.gitattributes+9
README.md+500-7
asset/.DS_StoreAdded
asset/architecture.pngAdded

Large File Pointer Details
- SHA256: 25cf68c2e9756581b25d7d4881362d85d2a430b9f25357404006fd70c9d4c45b
- Pointer size: 131 Bytes
- Size of remote file: 820 kB
asset/keye_logo_2.pngAdded

Large File Pointer Details
- SHA256: 550ccafbb3f2dc4a7223d836060fddd747cae3a4e4c36b94b332e4553813fec5
- Pointer size: 132 Bytes
- Size of remote file: 1.66 MB
asset/keyelogo/Keye-logo--black.pngAdded

Large File Pointer Details
- SHA256: 51acbeabcdf2cdb91a0dfb8a0cba4aded35e52c79d2d970fbab9355370173deb
- Pointer size: 132 Bytes
- Size of remote file: 1.82 MB
asset/keyelogo/Keye-logo--white.pngAdded

Large File Pointer Details
- SHA256: 693d4de2dc3c63968c74f5e89820363133e4b86f55a9d82db61b022be1a25502
- Pointer size: 132 Bytes
- Size of remote file: 1.81 MB
asset/keyelogo/Keye-logo.pngAdded

Large File Pointer Details
- SHA256: 838cdacab10b199a74021c07c94678a2b27d15855d023f01d330e0bbe8732c7d
- Pointer size: 131 Bytes
- Size of remote file: 961 kB
asset/performance.pngAdded

Large File Pointer Details
- SHA256: d1d2c7306fb3f17d365409538c6a388980184fc8c2c3dab4fb89b257bfeea074
- Pointer size: 131 Bytes
- Size of remote file: 252 kB
asset/post1.jpegAdded

asset/post1.pngAdded

asset/post2.jpegAdded

Large File Pointer Details
- SHA256: 078d089db23ebba73e7f11628102032da14ac723c1457725cdb4642f16c8376a
- Pointer size: 131 Bytes
- Size of remote file: 136 kB
asset/post2.pngAdded

asset/pre-train.pngAdded

Large File Pointer Details
- SHA256: 7f920c5545c11d2284adb0fecc91e2f3cb07869145f4c65a71fc1731982b1d4e
- Pointer size: 131 Bytes
- Size of remote file: 346 kB
asset/teaser.pngAdded

Large File Pointer Details
- SHA256: 2d5ebd097142398a6b50de7a7045b1fce39aa5635fc40798f88a6c8e132bb286
- Pointer size: 131 Bytes
- Size of remote file: 342 kB
configuration_keye_vl_1_5.py+1-1
image_processing_keye_vl_1_5.py+1-1
modeling_keye_vl_1_5.py+16-6
processing_keye_vl_1_5.py+1-1