🌐 AI搜索 & 代理 主页
Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Take advantage of the new quantized_config option
  • Loading branch information
SilasMarvin committed Jan 3, 2024
commit 685cc854f69dcb042f245c53362995e342df9435
19 changes: 15 additions & 4 deletions pgml-dashboard/src/api/chatbot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,17 +102,29 @@ impl ChatbotBrain {
Self::TekniumOpenHermes25Mistral7B => serde_json::json!({
"model": "TheBloke/OpenHermes-2.5-Mistral-7B-GPTQ",
"revision": "main",
"device_map": "auto"
"device_map": "auto",
"quantization_config": {
"bits": 4,
"max_input_length": 10000
}
}),
Self::GrypheMythoMaxL213b => serde_json::json!({
"model": "TheBloke/MythoMax-L2-13B-GPTQ",
"revision": "main",
"device_map": "auto"
"device_map": "auto",
"quantization_config": {
"bits": 4,
"max_input_length": 10000
}
}),
Self::Starling7b => serde_json::json!({
"model": "TheBloke/Starling-LM-7B-alpha-GPTQ",
"revision": "main",
"device_map": "auto"
"device_map": "auto",
"quantization_config": {
"bits": 4,
"max_input_length": 10000
}
}),
_ => unimplemented!(),
}
Expand Down Expand Up @@ -537,7 +549,6 @@ async fn process_message(
.map(|(_, context, metadata)| format!("\n\n#### Document {}: \n{}\n\n", metadata["id"], context))
.collect::<Vec<String>>()
.join("\n");
// let context = "".to_string();

let history_collection = Collection::new(
"ChatHistory",
Expand Down