Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit b9b5d68

Browse files
committedMar 14, 2024·
Fix formatting and workflow
1 parent 7c9ccbe commit b9b5d68

File tree

5 files changed

+39
-8
lines changed

5 files changed

+39
-8
lines changed
 

‎.github/workflows/llama_cpp_plugin_build_and_test.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
with:
3030
submodules: recursive
3131
repository: vshampor/openvino
32-
branch: llama_cpp_mod
32+
ref: llama_cpp_mod
3333
path: openvino
3434

3535
- name: CMake - configure
+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
BasedOnStyle: Google
2+
IndentWidth: 4
3+
UseTab: Never
4+
ColumnLimit: 120
5+
6+
Language: Cpp
7+
Standard: Cpp11
8+
9+
AccessModifierOffset: -4
10+
AlignConsecutiveMacros: true
11+
AllowAllArgumentsOnNextLine: false
12+
AllowAllConstructorInitializersOnNextLine: false
13+
AllowAllParametersOfDeclarationOnNextLine: false
14+
AllowShortFunctionsOnASingleLine: Empty
15+
AllowShortIfStatementsOnASingleLine: Never
16+
AllowShortLambdasOnASingleLine: Empty
17+
AllowShortLoopsOnASingleLine: false
18+
AlwaysBreakBeforeMultilineStrings: false
19+
BinPackArguments: false
20+
BinPackParameters: false
21+
CommentPragmas: '^#'
22+
DerivePointerAlignment: false
23+
FixNamespaceComments: true
24+
IndentCaseLabels: false
25+
IndentPPDirectives: AfterHash
26+
ForEachMacros:
27+
- foreach
28+
- FOREACH_CHILD

‎modules/llama_cpp_plugin/src/compiled_model.cpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,16 @@ LlamaCppModel::LlamaCppModel(const std::shared_ptr<ov::Model>& model,
1818
const ov::SoPtr<ov::IRemoteContext>& context,
1919
const std::shared_ptr<ov::threading::ITaskExecutor>& task_executor)
2020
: ICompiledModel(model, plugin, context, task_executor) {
21-
OPENVINO_THROW_NOT_IMPLEMENTED("Currently only direct GGUF file loading is supported for the LLAMA_CPP* plugins");
21+
OPENVINO_THROW_NOT_IMPLEMENTED("Currently only direct GGUF file loading is "
22+
"supported for the LLAMA_CPP* plugins");
2223
}
2324

2425
LlamaCppModel::LlamaCppModel(const std::shared_ptr<ov::Model>& ov_model,
2526
std::istream& input_stream,
2627
const std::shared_ptr<const IPlugin>& plugin)
2728
: ICompiledModel(ov_model, plugin) {
28-
OPENVINO_THROW_NOT_IMPLEMENTED("Currently only direct GGUF file loading is supported for the LLAMA_CPP* plugins");
29+
OPENVINO_THROW_NOT_IMPLEMENTED("Currently only direct GGUF file loading is "
30+
"supported for the LLAMA_CPP* plugins");
2931
}
3032

3133
LlamaCppModel::~LlamaCppModel() {

‎modules/llama_cpp_plugin/src/infer_request.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,11 @@ void llama_batch_add_reimpl(struct llama_batch& batch,
6060
}
6161

6262
void LlamaCppSyncInferRequest::infer() {
63-
auto input_ids_tensor_ptr = get_tensor(get_inputs()[0]); // TODO (vshampor) correctly identify input_ids among
64-
// all inputs without hardcode
65-
//
63+
auto input_ids_tensor_ptr = get_tensor(get_inputs()[0]); // TODO (vshampor) correctly identify input_ids among
64+
// all inputs without hardcode
65+
//
6666
auto position_ids_tensor_ptr = get_tensor(get_inputs()[2]); // TODO (vshampor) correctly identify input_ids among
67-
// all inputs without hardcode
67+
// all inputs without hardcode
6868
OPENVINO_ASSERT(input_ids_tensor_ptr->get_element_type() == ov::element::Type_t::i64);
6969
OPENVINO_ASSERT(input_ids_tensor_ptr->get_shape().size() == 2);
7070
size_t sequence_length = input_ids_tensor_ptr->get_shape()[1];

‎modules/llama_cpp_plugin/tests/e2e/prompt_response.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ const std::string TEST_FILES_DIR = "test_data";
77

88
// "Why is the Sun yellow?"
99
const std::vector<int64_t> GPT2_PROMPT_TOKEN_IDS = {5195, 318, 262, 3825, 7872, 30};
10-
// "The Sun is a bright red, which means it is a bright red. The Sun is a bright red because it is a bright red."
10+
// "The Sun is a bright red, which means it is a bright red. The Sun is a bright
11+
// red because it is a bright red."
1112
const std::vector<int64_t> GPT2_REFERENCE_RESPONSE_TOKEN_IDS = {
1213
198, 464, 3825, 318, 257, 6016, 2266, 11, 543, 1724, 340, 318, 257, 6016, 2266, 13,
1314
383, 3825, 318, 257, 6016, 2266, 780, 340, 318, 257, 6016, 2266, 13, 198, 198, 464};

0 commit comments

Comments
 (0)
Please sign in to comment.