gliner 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: eac979a64c4acb302685c0390322c688dcdf35097741ef5b201c83827013f6ce
4
- data.tar.gz: cc9fd10929e4dffe94ca1e4ce49ec0cea8e7569b22c7c9956cfad8d1bd0d5afc
3
+ metadata.gz: da7bc04df38770206535e5aecd24afb8a9d19def94b51a042dc835cbf31528e2
4
+ data.tar.gz: '06579535719cc6db12f15ec3087876f51e9f6be756436bd2cf5a7fd7ff4d050b'
5
5
  SHA512:
6
- metadata.gz: 4b75a4a0610a52d9364d988ba94277b1d55f0a116691bb6994ea571f9e2ab415aa006f22f2118c4268ef7a365e04614bde7ff8353b01ac4b5413d3545295d5bb
7
- data.tar.gz: 1498c299f0d522974a0bea27c4ae71a6fee01cd93b832105b197fe227a0a33c6f751220efb128982e96e934c5feea382fe46450c3ffa4f3c6973dfd2f73e3ca4
6
+ metadata.gz: de08fa742fd1aa3745673d362e544d8f1ffc62397f47c72581da09dc911398b91fc75bb07f6daf0e6428f9107e42a54dd8c517f39bc9e8c61ceeb5e9ea944e83
7
+ data.tar.gz: 9dde5631269e9e8a90ad551cde633c5eb89fd1ccb6cd413c8f893f9b1df2e5e077cc39065135dfbd525d32cc47f4a65876873cc4b5a2b65daa268d0e7835a334
data/README.md CHANGED
@@ -22,7 +22,7 @@ Gliner.configure do |config|
22
22
  # By default, the gem downloads the default model to .cache/
23
23
  # Or set a local path explicitly:
24
24
  # config.model = "/path/to/gliner2-multi-v1"
25
- config.variant = :fp16
25
+ config.variant = :int8
26
26
  end
27
27
 
28
28
  text = "Apple CEO Tim Cook announced iPhone 15 in Cupertino yesterday."
@@ -149,7 +149,7 @@ This implementation expects a directory containing:
149
149
  - (optional) `config.json` with `max_width` and `max_seq_len`
150
150
 
151
151
  One publicly available ONNX export is `cuerbot/gliner2-multi-v1` on Hugging Face.
152
- By default, `model_fp16.onnx` is used; set `config.variant` (or `GLINER_MODEL_FILE`) to override.
152
+ By default, `model_int8.onnx` is used; set `config.variant` (or `GLINER_MODEL_FILE`) to override.
153
153
  Variants map to files as: `:fp16` → `model_fp16.onnx`, `:fp32` → `model.onnx`, `:int8` → `model_int8.onnx`.
154
154
 
155
155
  You can also configure the model source directly:
@@ -194,7 +194,7 @@ If you omit `MODEL_DIR`, the console auto-downloads a public test model (configu
194
194
  ```bash
195
195
  rake console
196
196
  # or:
197
- GLINER_REPO_ID=cuerbot/gliner2-multi-v1 GLINER_MODEL_FILE=model_fp16.onnx rake console
197
+ GLINER_REPO_ID=cuerbot/gliner2-multi-v1 GLINER_MODEL_FILE=model_int8.onnx rake console
198
198
  ```
199
199
 
200
200
  Or:
@@ -10,7 +10,7 @@ module Gliner
10
10
  def initialize
11
11
  @threshold = DEFAULT_THRESHOLD
12
12
  @model = nil
13
- @variant = :fp16
13
+ @variant = :int8
14
14
  @auto = true
15
15
  end
16
16
 
data/lib/gliner/model.rb CHANGED
@@ -22,7 +22,7 @@ module Gliner
22
22
  DEFAULT_MAX_WIDTH = 8
23
23
  DEFAULT_MAX_SEQ_LEN = 512
24
24
 
25
- def self.from_dir(dir, file: 'model_fp16.onnx')
25
+ def self.from_dir(dir, file: 'model_int8.onnx')
26
26
  config_path = File.join(dir, 'config.json')
27
27
  config = File.exist?(config_path) ? JSON.parse(File.read(config_path)) : {}
28
28
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Gliner
4
- VERSION = '0.3.0'
4
+ VERSION = '0.3.1'
5
5
  end
data/lib/gliner.rb CHANGED
@@ -181,7 +181,7 @@ module Gliner
181
181
  dir
182
182
  end
183
183
 
184
- def model_file_for_variant(variant = :fp16)
184
+ def model_file_for_variant(variant = :int8)
185
185
  case variant.to_sym
186
186
  when :fp16 then 'model_fp16.onnx'
187
187
  when :fp32 then 'model.onnx'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gliner
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - elcuervo