User01110 commited on
Commit
9632173
·
verified ·
1 Parent(s): da7371f

Use custom config type to prevent Qwen3 fallback

Browse files
Files changed (3) hide show
  1. README.md +2 -2
  2. config.json +2 -2
  3. modeling_tinyqwen3_novelty.py +3 -4
README.md CHANGED
@@ -17,7 +17,7 @@ Tiny 8M-class Qwen3-config causal LM with math-only novelty-gated GQA.
17
 
18
  | Item | Value |
19
  | --- | ---: |
20
- | Config type | `qwen3` |
21
  | Parameters | 8.132M |
22
  | Layers | 8 |
23
  | Hidden size | 256 |
@@ -119,4 +119,4 @@ with torch.no_grad():
119
  print(tokenizer.decode(output[0], skip_special_tokens=True))
120
  ```
121
 
122
- This repo uses a self-contained remote `Qwen3Config` plus model code for a Qwen3-style dense decoder with a math-only novelty-gated attention block.
 
17
 
18
  | Item | Value |
19
  | --- | ---: |
20
+ | Config type | `tinyqwen3_novelty` |
21
  | Parameters | 8.132M |
22
  | Layers | 8 |
23
  | Hidden size | 256 |
 
119
  print(tokenizer.decode(output[0], skip_special_tokens=True))
120
  ```
121
 
122
+ This repo uses a self-contained remote `TinyQwen3NoveltyConfig` plus model code for a Qwen3-style dense decoder with a math-only novelty-gated attention block.
config.json CHANGED
@@ -1,10 +1,10 @@
1
  {
2
- "model_type": "qwen3",
3
  "architectures": [
4
  "TinyQwen3NoveltyForCausalLM"
5
  ],
6
  "auto_map": {
7
- "AutoConfig": "modeling_tinyqwen3_novelty.Qwen3Config",
8
  "AutoModelForCausalLM": "modeling_tinyqwen3_novelty.TinyQwen3NoveltyForCausalLM"
9
  },
10
  "vocab_size": 4098,
 
1
  {
2
+ "model_type": "tinyqwen3_novelty",
3
  "architectures": [
4
  "TinyQwen3NoveltyForCausalLM"
5
  ],
6
  "auto_map": {
7
+ "AutoConfig": "modeling_tinyqwen3_novelty.TinyQwen3NoveltyConfig",
8
  "AutoModelForCausalLM": "modeling_tinyqwen3_novelty.TinyQwen3NoveltyForCausalLM"
9
  },
10
  "vocab_size": 4098,
modeling_tinyqwen3_novelty.py CHANGED
@@ -1,4 +1,3 @@
1
-
2
  import torch
3
  import torch.nn as nn
4
  import torch.nn.functional as F
@@ -7,8 +6,8 @@ from transformers.generation import GenerationMixin
7
  from transformers.modeling_outputs import CausalLMOutput
8
 
9
 
10
- class Qwen3Config(PretrainedConfig):
11
- model_type = "qwen3"
12
 
13
  def __init__(
14
  self,
@@ -174,7 +173,7 @@ class TinyQwen3NoveltyBlock(nn.Module):
174
 
175
 
176
  class TinyQwen3NoveltyForCausalLM(PreTrainedModel, GenerationMixin):
177
- config_class = Qwen3Config
178
  base_model_prefix = ""
179
  _no_split_modules = ["TinyQwen3NoveltyBlock"]
180
  _tied_weights_keys = {}
 
 
1
  import torch
2
  import torch.nn as nn
3
  import torch.nn.functional as F
 
6
  from transformers.modeling_outputs import CausalLMOutput
7
 
8
 
9
+ class TinyQwen3NoveltyConfig(PretrainedConfig):
10
+ model_type = "tinyqwen3_novelty"
11
 
12
  def __init__(
13
  self,
 
173
 
174
 
175
  class TinyQwen3NoveltyForCausalLM(PreTrainedModel, GenerationMixin):
176
+ config_class = TinyQwen3NoveltyConfig
177
  base_model_prefix = ""
178
  _no_split_modules = ["TinyQwen3NoveltyBlock"]
179
  _tied_weights_keys = {}