Coder Social home page Coder Social logo

codefuse-ai / codefuse-modelcache Goto Github PK

View Code? Open in Web Editor NEW
724.0 20.0 38.0 2.77 MB

A LLM semantic caching system aiming to enhance user experience by reducing response time via cached query-result pairs.

License: Other

Python 100.00%
llm semantic-cache

codefuse-modelcache's Issues

非常感谢蚂蚁开源code模型

现在有几个功能想请假大佬,我使用的CodeFuse-CodeLlama-34B-4bits的模型,对auto_gptq不熟悉,不知道怎么修改成的openai_api的功能,能不能给一个使用AutoTokenizer, AutoModelForCausalLM调模型的案例。
另外一个是,我提问是
你是一个数据分析师,请使用python进行数据分析。我已提供文件titanic.csv,文件地址是/mnt/bst/,请你分析一下这个文件,先读取这个文件,请写出python代码
回答:
generate text is 首先,我们需要导入必要的库.我们将使用pandas,matplotlib和seaborn库.

import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns

然后,我们将读取文件.

df = pd.read_csv('/mnt/bst/titanic.csv')

接下来,我们将查看数据的前几行.

print(df.head())

然后,我们将查看数据的描述.

print(df.describe())

接下来,我们将查看数据的数据类型.

print(df.dtypes)

接下来,我们将查看数据中是否有缺失值.

print(df.isnull().sum())

接下来,我们将查看数据的唯一值.

print(df.nunique())

接下来,我们将查看数据的分布.

df.hist(bins=50, figsize=(20,15))
plt.show()

最后,我们将查看数据的相关性.

corr_matrix = df.corr()
sns.heatmap(corr_matrix, annot=True)
plt.show()

这些就是一些基本的数据分析步骤.你可以根据需要进行更多的数据分析.
回答是分段回答,这块我要怎么写提示词,形成一个整块的可马上执行的代码
非常感谢。

[Feature: Ranking ability] Add ranking model to refine the order of data after embedding recall

This issue is created to better track my PRs for Todo List [Rank ability]

Background

Efficiently retrieving relevant results from large-scale datasets plays a crucial role in software development and Q&A tasks, including code recommendation and vulnerability code clone discovery. Existing search approaches suffer the difficulty of being scaled up, while maintaining the effectiveness of retrieved results.

Prototype

In this paper, we propose a two-stage search framework to address these limitations and achieve both effectiveness and efficiency in the search Scenario. We will add ranking model to refine the order of data after embedding recall.

Screenshot 2024-05-28 at 10 37 53

Task

  • Add ranking model to refine the order of data after embedding recall.

cache是基于prompt的缓存?

看了一遍文章,没理解这块缓存是怎么优化的;
问题1.缓存是针对query,还是针对的prompt?
问题2:faiss中存的向量是历史的query吗?如果是的话对于那些同query会时间更新改变answer的case又是如何处理的?比如同样问现在几点了,模型每次都应该再算一次吧
问题3:下图这个分支是如何理解?能给个例子吗
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.