-
Notifications
You must be signed in to change notification settings - Fork 200
New issue
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
Grouped source files in GenAI src folder #1016
base: master
Are you sure you want to change the base?
Grouped source files in GenAI src folder #1016
Conversation
@@ -391,7 +392,7 @@ std::ostream& operator << (std::ostream& stream, const GenerationResult& generat | |||
} // namespace | |||
|
|||
|
|||
PYBIND11_MODULE(py_generate_pipeline, m) { | |||
PYBIND11_MODULE(py_llm_pipeline, m) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why don't you name the file and the module the same way cmake target is called?
@@ -5,7 +5,7 @@ | |||
#include <pybind11/stl.h> | |||
#include <pybind11/stl_bind.h> | |||
|
|||
#include "tokenizers_path.hpp" | |||
#include "tokenizer/tokenizer_path.hpp" | |||
#include "openvino/genai/whisper_generation_config.hpp" | |||
#include "openvino/genai/whisper_pipeline.hpp" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you modify only src folder and not include?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what are recommendations for include
?
Regarding Whisper specifically, I would move WhisperGenerationConfig inside the pipeline class, as it's done for text 2 image:
openvino.genai/src/cpp/include/openvino/genai/text2image/pipeline.hpp
Lines 50 to 70 in ad2faf5
class OPENVINO_GENAI_EXPORTS Text2ImagePipeline { | |
public: | |
class OPENVINO_GENAI_EXPORTS Scheduler { | |
public: | |
enum Type { | |
AUTO, | |
LCM, | |
LMS_DISCRETE, | |
DDIM, | |
EULER_DISCRETE | |
}; | |
static std::shared_ptr<Scheduler> from_config(const std::string& scheduler_config_path, | |
Type scheduler_type = AUTO); | |
virtual ~Scheduler(); | |
}; | |
struct OPENVINO_GENAI_EXPORTS GenerationConfig { | |
// LCM: prompt only w/o negative prompt | |
// SD XL: prompt2 and negative_prompt2 |
CC @as-suvorov
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes and
- continuous_batching
cache_eviction.hpp, continuous_batching_pipeline.hpp (rename to pipeline.hpp), scheduler_config.hpp - llm
llm_pipeline.hpp (rename to pipeline.hpp) - lora
lora_adapter.hpp BTW, should the files be renamed here and insrc
? - tokenizer
tokenizer.hpp
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
regarding 2-4 - why do we need to create a folder with a single file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consistency. The number of symbols would stay exactly the same in both versions of include.
7b25812
to
e8198ad
Compare
Created several subfolders: