Skip to content
New issue

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

是否可以添加faiss向量库的保存和加载 #26

Closed
Minami-su opened this issue Apr 6, 2024 · 3 comments
Closed

是否可以添加faiss向量库的保存和加载 #26

Minami-su opened this issue Apr 6, 2024 · 3 comments

Comments

@Minami-su
Copy link

Minami-su commented Apr 6, 2024

在上次对话结束后保存储存kv_cache的faiss,然后可以在下次对话中载入上次会话的kv_cache faiss

@guyan364
Copy link
Collaborator

guyan364 commented Apr 8, 2024

你好,faiss 本身作为可选项,目前没有计划拓展。你可以自行对 kv cache 进行操作实现 save/load。https://github.com/facebookresearch/faiss/wiki/Index-IO,-cloning-and-hyper-parameter-tuning#io-and-deep-copying-indexes

@guyan364 guyan364 closed this as completed Apr 8, 2024
@00ffcc
Copy link

00ffcc commented May 19, 2024

好像用torch.save就可以保存past_key_values,我实现了一下
QQ截图20240519211244

@Minami-su
Copy link
Author

Minami-su commented May 19, 2024

好像用torch.save就可以保存past_key_values,我实现了一下 QQ截图20240519211244

好厉害,非常感谢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants