File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 1
- //! This is a translation of embedding.cpp in llama.cpp using llama-cpp-2.
1
+ //! This is an example of reranking documents for a query using llama-cpp-2.
2
2
#![ allow(
3
3
clippy:: cast_possible_wrap,
4
4
clippy:: cast_possible_truncation,
@@ -45,6 +45,11 @@ struct Args {
45
45
/// Whether to normalise the produced embeddings
46
46
#[ clap( long, default_value_t = true ) ]
47
47
normalise : bool ,
48
+
49
+ /// Disable offloading layers to the gpu
50
+ #[ cfg( any( feature = "cuda" , feature = "vulkan" ) ) ]
51
+ #[ clap( long) ]
52
+ disable_gpu : bool ,
48
53
}
49
54
50
55
fn main ( ) -> Result < ( ) > {
@@ -54,6 +59,8 @@ fn main() -> Result<()> {
54
59
documents,
55
60
pooling,
56
61
normalise,
62
+ #[ cfg( any( feature = "cuda" , feature = "vulkan" ) ) ]
63
+ disable_gpu,
57
64
} = Args :: parse ( ) ;
58
65
59
66
// init LLM
You can’t perform that action at this time.
0 commit comments