Class: Xberg::RerankerModelTypeCustom
- Inherits:
-
Data
- Object
- Data
- Xberg::RerankerModelTypeCustom
- Extended by:
- T::Sig
- Includes:
- RerankerModelType
- Defined in:
- lib/xberg/native.rb
Overview
Use a custom ONNX cross-encoder from HuggingFace.
Instance Attribute Summary collapse
-
#additional_files ⇒ Object
readonly
Returns the value of attribute additional_files.
-
#head ⇒ Object
readonly
Returns the value of attribute head.
-
#max_length ⇒ Object
readonly
Returns the value of attribute max_length.
-
#model_file ⇒ Object
readonly
Returns the value of attribute model_file.
-
#model_id ⇒ Object
readonly
Returns the value of attribute model_id.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#additional_files ⇒ Object (readonly)
Returns the value of attribute additional_files
4721 4722 4723 |
# File 'lib/xberg/native.rb', line 4721 def additional_files @additional_files end |
#head ⇒ Object (readonly)
Returns the value of attribute head
4721 4722 4723 |
# File 'lib/xberg/native.rb', line 4721 def head @head end |
#max_length ⇒ Object (readonly)
Returns the value of attribute max_length
4721 4722 4723 |
# File 'lib/xberg/native.rb', line 4721 def max_length @max_length end |
#model_file ⇒ Object (readonly)
Returns the value of attribute model_file
4721 4722 4723 |
# File 'lib/xberg/native.rb', line 4721 def model_file @model_file end |
#model_id ⇒ Object (readonly)
Returns the value of attribute model_id
4721 4722 4723 |
# File 'lib/xberg/native.rb', line 4721 def model_id @model_id end |
Class Method Details
.from_hash(hash) ⇒ Object
4766 4767 4768 4769 4770 4771 4772 4773 4774 |
# File 'lib/xberg/native.rb', line 4766 def self.from_hash(hash) new( model_id: hash[:model_id] || hash["model_id"], model_file: hash[:model_file] || hash["model_file"], additional_files: hash[:additional_files] || hash["additional_files"], max_length: hash[:max_length] || hash["max_length"], head: hash[:head] || hash["head"] ) end |
Instance Method Details
#custom? ⇒ Boolean
4758 |
# File 'lib/xberg/native.rb', line 4758 def custom? = true |
#llm? ⇒ Boolean
4760 |
# File 'lib/xberg/native.rb', line 4760 def llm? = false |
#plugin? ⇒ Boolean
4762 4763 4764 |
# File 'lib/xberg/native.rb', line 4762 def plugin? = false # @param hash [Hash] deserialized from the native extension # @return [self] |
#preset? ⇒ Boolean
4756 |
# File 'lib/xberg/native.rb', line 4756 def preset? = false |