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
///
if (modelName == "BAAI/bge-reranker-v2-minicpm-layerwise") { dynamic flagReranker = flagEmbedding.LayerWiseFlagLLMReranker(model_dir, use_fp16: true); model = flagReranker; } else { dynamic flagReranker = flagEmbedding.FlagReranker(model_dir, use_fp16: true); model = flagReranker; } return model; } } catch (Exception ex) { throw ex; } } else { return model; } }
}
下面是调用数据: PyList cutoffLayers = new PyList(); cutoffLayers.Append(new PyInt(8)); dynamic scores = model.compute_score(pyList, cutoff_layers: cutoffLayers);
执行 model.compute_score 就重启。
The text was updated successfully, but these errors were encountered:
看报错信息是端口被占用
Sorry, something went wrong.
No branches or pull requests
///
/// 模型写死
///
public static dynamic LoadModel(string pythondllPath, string modelName)
{
lock (lockobj)
{
if (model == null)
{
PyRunTime.InitRunTime(pythondllPath);
try
{
using (GIL())// 初始化Python环境的Global Interpreter Lock)
{
dynamic modelscope = Py.Import("modelscope");
dynamic flagEmbedding = Py.Import("FlagEmbedding");
dynamic model_dir = modelscope.snapshot_download(modelName, revision: "master");
}
下面是调用数据:
PyList cutoffLayers = new PyList();
cutoffLayers.Append(new PyInt(8));
dynamic scores = model.compute_score(pyList, cutoff_layers: cutoffLayers);
执行 model.compute_score 就重启。
The text was updated successfully, but these errors were encountered: