We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
你好,这篇文章和代码实现细看了下,如果我想接入一个新的模型来支持infLLM,需要哪些满足条件,个人理解:
The text was updated successfully, but these errors were encountered:
你的理解是对的,基本上目前使用 rope 的模型都可以使用 infLLM. 我们没有太多时间维护这个仓库,现在主要用于提供论文结果复现. 如果你需要适配其他开源模型,可以参照 patch.py 中的实现,加入其他模型的 attention forward 替换.
Sorry, something went wrong.
好的,感谢你的回复。
No branches or pull requests
你好,这篇文章和代码实现细看了下,如果我想接入一个新的模型来支持infLLM,需要哪些满足条件,个人理解:
def forward(
self,
hidden_states: torch.Tensor,
attention_mask: Optional[torch.Tensor] = None,
position_ids: Optional[torch.LongTensor] = None,
past_key_value: Optional[Cache] = None,
output_attentions: bool = False,
use_cache: bool = False,
**kwargs,
) ,目的是为了与InfLLM定义的hf_forward的入参完全保持一致;
感觉应该够了,对吧,还需要其他硬性满足条件吗?
如确实如此,那么接入一个新的开源模型应该很容易对吧?为什么我看你这边只接入了LlamaForCausalLM,MistralForCausalLM,Qwen2ForCausalLM这三个?
The text was updated successfully, but these errors were encountered: