Class: Abliteration::ModelDetail

Inherits:
ApiModelBase show all
Defined in:
lib/abliteration/models/model_detail.rb

Overview

The full catalog record, plus files, benchmarks and an author summary.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from ApiModelBase

_deserialize, #_to_hash, #to_body, #to_s

Constructor Details

#initialize(attributes = {}) ⇒ ModelDetail

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {}) —

    Model attributes in the form of hash



307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
# File 'lib/abliteration/models/model_detail.rb', line 307

def initialize(attributes = {})
  if (!attributes.is_a?(Hash))
    fail ArgumentError, "The input argument (attributes) must be a hash in `Abliteration::ModelDetail` initialize method"
  end

  # check to see if the attribute exists and convert string to symbol for hash key
  acceptable_attribute_map = self.class.acceptable_attribute_map
  attributes = attributes.each_with_object({}) { |(k, v), h|
    if (!acceptable_attribute_map.key?(k.to_sym))
      fail ArgumentError, "`#{k}` is not a valid attribute in `Abliteration::ModelDetail`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
    end
    h[k.to_sym] = v
  }

  if attributes.key?(:'id')
    self.id = attributes[:'id']
  end

  if attributes.key?(:'author')
    self.author = attributes[:'author']
  end

  if attributes.key?(:'name')
    self.name = attributes[:'name']
  end

  if attributes.key?(:'primary_method')
    self.primary_method = attributes[:'primary_method']
  end

  if attributes.key?(:'secondary_methods')
    self.secondary_methods = attributes[:'secondary_methods']
  end

  if attributes.key?(:'confidence')
    self.confidence = attributes[:'confidence']
  end

  if attributes.key?(:'classification_evidence')
    self.classification_evidence = attributes[:'classification_evidence']
  end

  if attributes.key?(:'classifier_version')
    self.classifier_version = attributes[:'classifier_version']
  end

  if attributes.key?(:'classified_at')
    self.classified_at = attributes[:'classified_at']
  end

  if attributes.key?(:'family')
    self.family = attributes[:'family']
  end

  if attributes.key?(:'params_b')
    self.params_b = attributes[:'params_b']
  end

  if attributes.key?(:'is_gguf')
    self.is_gguf = attributes[:'is_gguf']
  end

  if attributes.key?(:'is_moe')
    self.is_moe = attributes[:'is_moe']
  end

  if attributes.key?(:'is_multimodal')
    self.is_multimodal = attributes[:'is_multimodal']
  end

  if attributes.key?(:'is_image_gen')
    self.is_image_gen = attributes[:'is_image_gen']
  end

  if attributes.key?(:'is_second_order')
    self.is_second_order = attributes[:'is_second_order']
  end

  if attributes.key?(:'downloads')
    self.downloads = attributes[:'downloads']
  end

  if attributes.key?(:'likes')
    self.likes = attributes[:'likes']
  end

  if attributes.key?(:'created_at')
    self.created_at = attributes[:'created_at']
  end

  if attributes.key?(:'last_modified')
    self.last_modified = attributes[:'last_modified']
  end

  if attributes.key?(:'first_seen_at')
    self.first_seen_at = attributes[:'first_seen_at']
  end

  if attributes.key?(:'last_seen_at')
    self.last_seen_at = attributes[:'last_seen_at']
  end

  if attributes.key?(:'is_delisted')
    self.is_delisted = attributes[:'is_delisted']
  end

  if attributes.key?(:'days_since_gone')
    self.days_since_gone = attributes[:'days_since_gone']
  end

  if attributes.key?(:'readme_text')
    self.readme_text = attributes[:'readme_text']
  end

  if attributes.key?(:'readme_status')
    self.readme_status = attributes[:'readme_status']
  end

  if attributes.key?(:'tags')
    self.tags = attributes[:'tags']
  end

  if attributes.key?(:'pipeline_tag')
    self.pipeline_tag = attributes[:'pipeline_tag']
  end

  if attributes.key?(:'library_name')
    self.library_name = attributes[:'library_name']
  end

  if attributes.key?(:'yaml_base_model')
    self.yaml_base_model = attributes[:'yaml_base_model']
  end

  if attributes.key?(:'yaml_language')
    self.yaml_language = attributes[:'yaml_language']
  end

  if attributes.key?(:'yaml_datasets')
    self.yaml_datasets = attributes[:'yaml_datasets']
  end

  if attributes.key?(:'yaml_license')
    self.yaml_license = attributes[:'yaml_license']
  end

  if attributes.key?(:'yaml_tags')
    self.yaml_tags = attributes[:'yaml_tags']
  end

  if attributes.key?(:'files_count')
    self.files_count = attributes[:'files_count']
  end

  if attributes.key?(:'total_size_bytes')
    self.total_size_bytes = attributes[:'total_size_bytes']
  end

  if attributes.key?(:'largest_file_bytes')
    self.largest_file_bytes = attributes[:'largest_file_bytes']
  end

  if attributes.key?(:'smallest_model_bytes')
    self.smallest_model_bytes = attributes[:'smallest_model_bytes']
  end

  if attributes.key?(:'quantizations')
    self.quantizations = attributes[:'quantizations']
  end

  if attributes.key?(:'has_mmproj')
    self.has_mmproj = attributes[:'has_mmproj']
  end

  if attributes.key?(:'hub_downloads_all_time')
    self.hub_downloads_all_time = attributes[:'hub_downloads_all_time']
  end

  if attributes.key?(:'hub_trending_score')
    self.hub_trending_score = attributes[:'hub_trending_score']
  end

  if attributes.key?(:'hub_real_params_m')
    self.hub_real_params_m = attributes[:'hub_real_params_m']
  end

  if attributes.key?(:'hub_context_length')
    self.hub_context_length = attributes[:'hub_context_length']
  end

  if attributes.key?(:'hub_siblings_count')
    self.hub_siblings_count = attributes[:'hub_siblings_count']
  end

  if attributes.key?(:'hub_provider_count')
    self.hub_provider_count = attributes[:'hub_provider_count']
  end

  if attributes.key?(:'hub_provider_names')
    self.hub_provider_names = attributes[:'hub_provider_names']
  end

  if attributes.key?(:'hub_enriched_at')
    self.hub_enriched_at = attributes[:'hub_enriched_at']
  end

  if attributes.key?(:'files')
    if (value = attributes[:'files']).is_a?(Array)
      self.files = value
    end
  end

  if attributes.key?(:'benchmarks')
    self.benchmarks = attributes[:'benchmarks']
  end

  if attributes.key?(:'author_summary')
    self.author_summary = attributes[:'author_summary']
  end
end

Instance Attribute Details

#author ⇒ Object

Returns the value of attribute author.



21
22
23
# File 'lib/abliteration/models/model_detail.rb', line 21

def author
  @author
end

#author_summary ⇒ Object

Returns the value of attribute author_summary.



127
128
129
# File 'lib/abliteration/models/model_detail.rb', line 127

def author_summary
  @author_summary
end

#benchmarks ⇒ Object

Two arrays under own and base — each item has benchmark_name, score, source, pertains_to.



125
126
127
# File 'lib/abliteration/models/model_detail.rb', line 125

def benchmarks
  @benchmarks
end

#classification_evidence ⇒ Object

JSON-encoded array of evidence strings.



33
34
35
# File 'lib/abliteration/models/model_detail.rb', line 33

def classification_evidence
  @classification_evidence
end

#classified_at ⇒ Object

Returns the value of attribute classified_at.



37
38
39
# File 'lib/abliteration/models/model_detail.rb', line 37

def classified_at
  @classified_at
end

#classifier_version ⇒ Object

Returns the value of attribute classifier_version.



35
36
37
# File 'lib/abliteration/models/model_detail.rb', line 35

def classifier_version
  @classifier_version
end

#confidence ⇒ Object

Returns the value of attribute confidence.



30
31
32
# File 'lib/abliteration/models/model_detail.rb', line 30

def confidence
  @confidence
end

#created_at ⇒ Object

Returns the value of attribute created_at.



57
58
59
# File 'lib/abliteration/models/model_detail.rb', line 57

def created_at
  @created_at
end

#days_since_gone ⇒ Object

Whole days between last_seen_at and now. null unless is_delisted=1.



69
70
71
# File 'lib/abliteration/models/model_detail.rb', line 69

def days_since_gone
  @days_since_gone
end

#downloads ⇒ Object

Returns the value of attribute downloads.



53
54
55
# File 'lib/abliteration/models/model_detail.rb', line 53

def downloads
  @downloads
end

#family ⇒ Object

Returns the value of attribute family.



39
40
41
# File 'lib/abliteration/models/model_detail.rb', line 39

def family
  @family
end

#files ⇒ Object

Per-file manifest: filename, size_bytes, sha256, quantization, is_model_file, is_mmproj.



122
123
124
# File 'lib/abliteration/models/model_detail.rb', line 122

def files
  @files
end

#files_count ⇒ Object

Returns the value of attribute files_count.



92
93
94
# File 'lib/abliteration/models/model_detail.rb', line 92

def files_count
  @files_count
end

#first_seen_at ⇒ Object

Returns the value of attribute first_seen_at.



61
62
63
# File 'lib/abliteration/models/model_detail.rb', line 61

def first_seen_at
  @first_seen_at
end

#has_mmproj ⇒ Object

Returns the value of attribute has_mmproj.



103
104
105
# File 'lib/abliteration/models/model_detail.rb', line 103

def has_mmproj
  @has_mmproj
end

#hub_context_length ⇒ Object

Returns the value of attribute hub_context_length.



111
112
113
# File 'lib/abliteration/models/model_detail.rb', line 111

def hub_context_length
  @hub_context_length
end

#hub_downloads_all_time ⇒ Object

Returns the value of attribute hub_downloads_all_time.



105
106
107
# File 'lib/abliteration/models/model_detail.rb', line 105

def hub_downloads_all_time
  @hub_downloads_all_time
end

#hub_enriched_at ⇒ Object

Returns the value of attribute hub_enriched_at.



119
120
121
# File 'lib/abliteration/models/model_detail.rb', line 119

def hub_enriched_at
  @hub_enriched_at
end

#hub_provider_count ⇒ Object

Returns the value of attribute hub_provider_count.



115
116
117
# File 'lib/abliteration/models/model_detail.rb', line 115

def hub_provider_count
  @hub_provider_count
end

#hub_provider_names ⇒ Object

Returns the value of attribute hub_provider_names.



117
118
119
# File 'lib/abliteration/models/model_detail.rb', line 117

def hub_provider_names
  @hub_provider_names
end

#hub_real_params_m ⇒ Object

Returns the value of attribute hub_real_params_m.



109
110
111
# File 'lib/abliteration/models/model_detail.rb', line 109

def hub_real_params_m
  @hub_real_params_m
end

#hub_siblings_count ⇒ Object

Returns the value of attribute hub_siblings_count.



113
114
115
# File 'lib/abliteration/models/model_detail.rb', line 113

def hub_siblings_count
  @hub_siblings_count
end

Returns the value of attribute hub_trending_score.



107
108
109
# File 'lib/abliteration/models/model_detail.rb', line 107

def hub_trending_score
  @hub_trending_score
end

#id ⇒ Object

Returns the value of attribute id.



19
20
21
# File 'lib/abliteration/models/model_detail.rb', line 19

def id
  @id
end

#is_delisted ⇒ Object

0/1 flag. 1 means HF no longer serves this model — the response is the last state we recorded.



66
67
68
# File 'lib/abliteration/models/model_detail.rb', line 66

def is_delisted
  @is_delisted
end

#is_gguf ⇒ Object

Returns the value of attribute is_gguf.



43
44
45
# File 'lib/abliteration/models/model_detail.rb', line 43

def is_gguf
  @is_gguf
end

#is_image_gen ⇒ Object

Returns the value of attribute is_image_gen.



49
50
51
# File 'lib/abliteration/models/model_detail.rb', line 49

def is_image_gen
  @is_image_gen
end

#is_moe ⇒ Object

Returns the value of attribute is_moe.



45
46
47
# File 'lib/abliteration/models/model_detail.rb', line 45

def is_moe
  @is_moe
end

#is_multimodal ⇒ Object

Returns the value of attribute is_multimodal.



47
48
49
# File 'lib/abliteration/models/model_detail.rb', line 47

def is_multimodal
  @is_multimodal
end

#is_second_order ⇒ Object

Returns the value of attribute is_second_order.



51
52
53
# File 'lib/abliteration/models/model_detail.rb', line 51

def is_second_order
  @is_second_order
end

#largest_file_bytes ⇒ Object

Returns the value of attribute largest_file_bytes.



96
97
98
# File 'lib/abliteration/models/model_detail.rb', line 96

def largest_file_bytes
  @largest_file_bytes
end

#last_modified ⇒ Object

Returns the value of attribute last_modified.



59
60
61
# File 'lib/abliteration/models/model_detail.rb', line 59

def last_modified
  @last_modified
end

#last_seen_at ⇒ Object

Returns the value of attribute last_seen_at.



63
64
65
# File 'lib/abliteration/models/model_detail.rb', line 63

def last_seen_at
  @last_seen_at
end

#library_name ⇒ Object

Returns the value of attribute library_name.



80
81
82
# File 'lib/abliteration/models/model_detail.rb', line 80

def library_name
  @library_name
end

#likes ⇒ Object

Returns the value of attribute likes.



55
56
57
# File 'lib/abliteration/models/model_detail.rb', line 55

def likes
  @likes
end

#name ⇒ Object

Returns the value of attribute name.



23
24
25
# File 'lib/abliteration/models/model_detail.rb', line 23

def name
  @name
end

#params_b ⇒ Object

Returns the value of attribute params_b.



41
42
43
# File 'lib/abliteration/models/model_detail.rb', line 41

def params_b
  @params_b
end

#pipeline_tag ⇒ Object

Returns the value of attribute pipeline_tag.



78
79
80
# File 'lib/abliteration/models/model_detail.rb', line 78

def pipeline_tag
  @pipeline_tag
end

#primary_method ⇒ Object

Returns the value of attribute primary_method.



25
26
27
# File 'lib/abliteration/models/model_detail.rb', line 25

def primary_method
  @primary_method
end

#quantizations ⇒ Object

JSON-encoded array of quantisation labels.



101
102
103
# File 'lib/abliteration/models/model_detail.rb', line 101

def quantizations
  @quantizations
end

#readme_status ⇒ Object

Returns the value of attribute readme_status.



73
74
75
# File 'lib/abliteration/models/model_detail.rb', line 73

def readme_status
  @readme_status
end

#readme_text ⇒ Object

Returns the value of attribute readme_text.



71
72
73
# File 'lib/abliteration/models/model_detail.rb', line 71

def readme_text
  @readme_text
end

#secondary_methods ⇒ Object

JSON-encoded array of extra method codes.



28
29
30
# File 'lib/abliteration/models/model_detail.rb', line 28

def secondary_methods
  @secondary_methods
end

#smallest_model_bytes ⇒ Object

Returns the value of attribute smallest_model_bytes.



98
99
100
# File 'lib/abliteration/models/model_detail.rb', line 98

def smallest_model_bytes
  @smallest_model_bytes
end

#tags ⇒ Object

JSON-encoded array of Hub tags.



76
77
78
# File 'lib/abliteration/models/model_detail.rb', line 76

def tags
  @tags
end

#total_size_bytes ⇒ Object

Returns the value of attribute total_size_bytes.



94
95
96
# File 'lib/abliteration/models/model_detail.rb', line 94

def total_size_bytes
  @total_size_bytes
end

#yaml_base_model ⇒ Object

Returns the value of attribute yaml_base_model.



82
83
84
# File 'lib/abliteration/models/model_detail.rb', line 82

def yaml_base_model
  @yaml_base_model
end

#yaml_datasets ⇒ Object

Returns the value of attribute yaml_datasets.



86
87
88
# File 'lib/abliteration/models/model_detail.rb', line 86

def yaml_datasets
  @yaml_datasets
end

#yaml_language ⇒ Object

Returns the value of attribute yaml_language.



84
85
86
# File 'lib/abliteration/models/model_detail.rb', line 84

def yaml_language
  @yaml_language
end

#yaml_license ⇒ Object

Returns the value of attribute yaml_license.



88
89
90
# File 'lib/abliteration/models/model_detail.rb', line 88

def yaml_license
  @yaml_license
end

#yaml_tags ⇒ Object

Returns the value of attribute yaml_tags.



90
91
92
# File 'lib/abliteration/models/model_detail.rb', line 90

def yaml_tags
  @yaml_tags
end

Class Method Details

.acceptable_attribute_map ⇒ Object

Returns attribute mapping this model knows about



187
188
189
# File 'lib/abliteration/models/model_detail.rb', line 187

def self.acceptable_attribute_map
  attribute_map
end

.acceptable_attributes ⇒ Object

Returns all the JSON keys this model knows about



192
193
194
# File 'lib/abliteration/models/model_detail.rb', line 192

def self.acceptable_attributes
  acceptable_attribute_map.values
end

.attribute_map ⇒ Object

Attribute mapping from ruby-style variable name to JSON key.



130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
# File 'lib/abliteration/models/model_detail.rb', line 130

def self.attribute_map
  {
    :'id' => :'id',
    :'author' => :'author',
    :'name' => :'name',
    :'primary_method' => :'primary_method',
    :'secondary_methods' => :'secondary_methods',
    :'confidence' => :'confidence',
    :'classification_evidence' => :'classification_evidence',
    :'classifier_version' => :'classifier_version',
    :'classified_at' => :'classified_at',
    :'family' => :'family',
    :'params_b' => :'params_b',
    :'is_gguf' => :'is_gguf',
    :'is_moe' => :'is_moe',
    :'is_multimodal' => :'is_multimodal',
    :'is_image_gen' => :'is_image_gen',
    :'is_second_order' => :'is_second_order',
    :'downloads' => :'downloads',
    :'likes' => :'likes',
    :'created_at' => :'created_at',
    :'last_modified' => :'last_modified',
    :'first_seen_at' => :'first_seen_at',
    :'last_seen_at' => :'last_seen_at',
    :'is_delisted' => :'is_delisted',
    :'days_since_gone' => :'days_since_gone',
    :'readme_text' => :'readme_text',
    :'readme_status' => :'readme_status',
    :'tags' => :'tags',
    :'pipeline_tag' => :'pipeline_tag',
    :'library_name' => :'library_name',
    :'yaml_base_model' => :'yaml_base_model',
    :'yaml_language' => :'yaml_language',
    :'yaml_datasets' => :'yaml_datasets',
    :'yaml_license' => :'yaml_license',
    :'yaml_tags' => :'yaml_tags',
    :'files_count' => :'files_count',
    :'total_size_bytes' => :'total_size_bytes',
    :'largest_file_bytes' => :'largest_file_bytes',
    :'smallest_model_bytes' => :'smallest_model_bytes',
    :'quantizations' => :'quantizations',
    :'has_mmproj' => :'has_mmproj',
    :'hub_downloads_all_time' => :'hub_downloads_all_time',
    :'hub_trending_score' => :'hub_trending_score',
    :'hub_real_params_m' => :'hub_real_params_m',
    :'hub_context_length' => :'hub_context_length',
    :'hub_siblings_count' => :'hub_siblings_count',
    :'hub_provider_count' => :'hub_provider_count',
    :'hub_provider_names' => :'hub_provider_names',
    :'hub_enriched_at' => :'hub_enriched_at',
    :'files' => :'files',
    :'benchmarks' => :'benchmarks',
    :'author_summary' => :'author_summary'
  }
end

.build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash) —

    Model attributes in the form of hash

Returns:

  • (Object) —

    Returns the model itself



616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
# File 'lib/abliteration/models/model_detail.rb', line 616

def self.build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)
  attributes = attributes.transform_keys(&:to_sym)
  transformed_hash = {}
  openapi_types.each_pair do |key, type|
    if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
      transformed_hash["#{key}"] = nil
    elsif type =~ /\AArray<(.*)>/i
      # check to ensure the input is an array given that the attribute
      # is documented as an array but the input is not
      if attributes[attribute_map[key]].is_a?(Array)
        transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
      end
    elsif !attributes[attribute_map[key]].nil?
      transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
    end
  end
  new(transformed_hash)
end

.openapi_nullable ⇒ Object

List of attributes with nullable: true



254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
# File 'lib/abliteration/models/model_detail.rb', line 254

def self.openapi_nullable
  Set.new([
    :'primary_method',
    :'secondary_methods',
    :'confidence',
    :'classification_evidence',
    :'classifier_version',
    :'classified_at',
    :'family',
    :'params_b',
    :'is_gguf',
    :'is_moe',
    :'is_multimodal',
    :'is_image_gen',
    :'is_second_order',
    :'downloads',
    :'likes',
    :'created_at',
    :'last_modified',
    :'first_seen_at',
    :'last_seen_at',
    :'is_delisted',
    :'days_since_gone',
    :'readme_text',
    :'readme_status',
    :'tags',
    :'pipeline_tag',
    :'library_name',
    :'yaml_base_model',
    :'yaml_language',
    :'yaml_datasets',
    :'yaml_license',
    :'yaml_tags',
    :'files_count',
    :'total_size_bytes',
    :'largest_file_bytes',
    :'smallest_model_bytes',
    :'quantizations',
    :'has_mmproj',
    :'hub_downloads_all_time',
    :'hub_trending_score',
    :'hub_real_params_m',
    :'hub_context_length',
    :'hub_siblings_count',
    :'hub_provider_count',
    :'hub_provider_names',
    :'hub_enriched_at',
    :'author_summary'
  ])
end

.openapi_types ⇒ Object

Attribute type mapping.



197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
# File 'lib/abliteration/models/model_detail.rb', line 197

def self.openapi_types
  {
    :'id' => :'String',
    :'author' => :'String',
    :'name' => :'String',
    :'primary_method' => :'String',
    :'secondary_methods' => :'String',
    :'confidence' => :'String',
    :'classification_evidence' => :'String',
    :'classifier_version' => :'String',
    :'classified_at' => :'String',
    :'family' => :'String',
    :'params_b' => :'Float',
    :'is_gguf' => :'Integer',
    :'is_moe' => :'Integer',
    :'is_multimodal' => :'Integer',
    :'is_image_gen' => :'Integer',
    :'is_second_order' => :'Integer',
    :'downloads' => :'Integer',
    :'likes' => :'Integer',
    :'created_at' => :'String',
    :'last_modified' => :'String',
    :'first_seen_at' => :'String',
    :'last_seen_at' => :'String',
    :'is_delisted' => :'Integer',
    :'days_since_gone' => :'Integer',
    :'readme_text' => :'String',
    :'readme_status' => :'String',
    :'tags' => :'String',
    :'pipeline_tag' => :'String',
    :'library_name' => :'String',
    :'yaml_base_model' => :'String',
    :'yaml_language' => :'String',
    :'yaml_datasets' => :'String',
    :'yaml_license' => :'String',
    :'yaml_tags' => :'String',
    :'files_count' => :'Integer',
    :'total_size_bytes' => :'Integer',
    :'largest_file_bytes' => :'Integer',
    :'smallest_model_bytes' => :'Integer',
    :'quantizations' => :'String',
    :'has_mmproj' => :'Integer',
    :'hub_downloads_all_time' => :'Integer',
    :'hub_trending_score' => :'Integer',
    :'hub_real_params_m' => :'Float',
    :'hub_context_length' => :'Integer',
    :'hub_siblings_count' => :'Integer',
    :'hub_provider_count' => :'Integer',
    :'hub_provider_names' => :'String',
    :'hub_enriched_at' => :'String',
    :'files' => :'Array<Object>',
    :'benchmarks' => :'Object',
    :'author_summary' => :'Author'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object) —

    to be compared



545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
# File 'lib/abliteration/models/model_detail.rb', line 545

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      id == o.id &&
      author == o.author &&
      name == o.name &&
      primary_method == o.primary_method &&
      secondary_methods == o.secondary_methods &&
      confidence == o.confidence &&
      classification_evidence == o.classification_evidence &&
      classifier_version == o.classifier_version &&
      classified_at == o.classified_at &&
      family == o.family &&
      params_b == o.params_b &&
      is_gguf == o.is_gguf &&
      is_moe == o.is_moe &&
      is_multimodal == o.is_multimodal &&
      is_image_gen == o.is_image_gen &&
      is_second_order == o.is_second_order &&
      downloads == o.downloads &&
      likes == o.likes &&
      created_at == o.created_at &&
      last_modified == o.last_modified &&
      first_seen_at == o.first_seen_at &&
      last_seen_at == o.last_seen_at &&
      is_delisted == o.is_delisted &&
      days_since_gone == o.days_since_gone &&
      readme_text == o.readme_text &&
      readme_status == o.readme_status &&
      tags == o.tags &&
      pipeline_tag == o.pipeline_tag &&
      library_name == o.library_name &&
      yaml_base_model == o.yaml_base_model &&
      yaml_language == o.yaml_language &&
      yaml_datasets == o.yaml_datasets &&
      yaml_license == o.yaml_license &&
      yaml_tags == o.yaml_tags &&
      files_count == o.files_count &&
      total_size_bytes == o.total_size_bytes &&
      largest_file_bytes == o.largest_file_bytes &&
      smallest_model_bytes == o.smallest_model_bytes &&
      quantizations == o.quantizations &&
      has_mmproj == o.has_mmproj &&
      hub_downloads_all_time == o.hub_downloads_all_time &&
      hub_trending_score == o.hub_trending_score &&
      hub_real_params_m == o.hub_real_params_m &&
      hub_context_length == o.hub_context_length &&
      hub_siblings_count == o.hub_siblings_count &&
      hub_provider_count == o.hub_provider_count &&
      hub_provider_names == o.hub_provider_names &&
      hub_enriched_at == o.hub_enriched_at &&
      files == o.files &&
      benchmarks == o.benchmarks &&
      author_summary == o.author_summary
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object) —

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


603
604
605
# File 'lib/abliteration/models/model_detail.rb', line 603

def eql?(o)
  self == o
end

#hash ⇒ Integer

Calculates hash code according to all attributes.

Returns:

  • (Integer) —

    Hash code



609
610
611
# File 'lib/abliteration/models/model_detail.rb', line 609

def hash
  [id, author, name, primary_method, secondary_methods, confidence, classification_evidence, classifier_version, classified_at, family, params_b, is_gguf, is_moe, is_multimodal, is_image_gen, is_second_order, downloads, likes, created_at, last_modified, first_seen_at, last_seen_at, is_delisted, days_since_gone, readme_text, readme_status, tags, pipeline_tag, library_name, yaml_base_model, yaml_language, yaml_datasets, yaml_license, yaml_tags, files_count, total_size_bytes, largest_file_bytes, smallest_model_bytes, quantizations, has_mmproj, hub_downloads_all_time, hub_trending_score, hub_real_params_m, hub_context_length, hub_siblings_count, hub_provider_count, hub_provider_names, hub_enriched_at, files, benchmarks, author_summary].hash
end

#list_invalid_properties ⇒ Object

Show invalid properties with the reasons. Usually used together with valid?

Returns:

  • Array for valid properties with the reasons



530
531
532
533
534
# File 'lib/abliteration/models/model_detail.rb', line 530

def list_invalid_properties
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
  invalid_properties = Array.new
  invalid_properties
end

#to_hash ⇒ Hash

Returns the object in the form of hash

Returns:

  • (Hash) —

    Returns the object in the form of hash



638
639
640
641
642
643
644
645
646
647
648
649
650
# File 'lib/abliteration/models/model_detail.rb', line 638

def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = self.send(attr)
    if value.nil?
      is_nullable = self.class.openapi_nullable.include?(attr)
      next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
    end

    hash[param] = _to_hash(value)
  end
  hash
end

#valid? ⇒ Boolean

Check to see if the all the properties in the model are valid

Returns:

  • (Boolean) —

    true if the model is valid



538
539
540
541
# File 'lib/abliteration/models/model_detail.rb', line 538

def valid?
  warn '[DEPRECATED] the `valid?` method is obsolete'
  true
end