Text Generation
Transformers
Safetensors
English
qwen3-next
gated-deltanet
hybrid-attention
mixture-of-experts
Mixture of Experts
tinystories
tiny-model
validation
debug-model
Instructions to use shibatch/tinyqwen3next3m with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use shibatch/tinyqwen3next3m with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="shibatch/tinyqwen3next3m")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("shibatch/tinyqwen3next3m", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use shibatch/tinyqwen3next3m with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "shibatch/tinyqwen3next3m" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "shibatch/tinyqwen3next3m", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/shibatch/tinyqwen3next3m
- SGLang
How to use shibatch/tinyqwen3next3m with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "shibatch/tinyqwen3next3m" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "shibatch/tinyqwen3next3m", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "shibatch/tinyqwen3next3m" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "shibatch/tinyqwen3next3m", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use shibatch/tinyqwen3next3m with Docker Model Runner:
docker model run hf.co/shibatch/tinyqwen3next3m
File size: 6,201 Bytes
2a91759 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 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 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 | {
"model_type": "qwen3_gated_moe_qwen3_next",
"hf_model_type": "qwen3_next",
"architecture": "qwen3_next",
"parameter_count": 2945914,
"tokenizer_size": 1003,
"final_eval_loss": 1.4319972917437553,
"final_eval_ppl": 4.187053613650411,
"final_train_lm_loss": 1.4144856333732605,
"router_usage": {
"model.layers.0.mlp.gate": [
0.1257,
0.098,
0.1444,
0.1294,
0.157,
0.1163,
0.1017,
0.1274
],
"model.layers.1.mlp.gate": [
0.1737,
0.0915,
0.0998,
0.1762,
0.1692,
0.0784,
0.0892,
0.1219
],
"model.layers.2.mlp.gate": [
0.1078,
0.1311,
0.2018,
0.091,
0.1046,
0.1521,
0.1415,
0.07
],
"model.layers.3.mlp.gate": [
0.0827,
0.1803,
0.0596,
0.1023,
0.066,
0.1445,
0.1774,
0.1873
]
},
"args": {
"train_files": [
"data/train-00000-of-00004-2d5a1467fff1081b.parquet",
"data/train-00001-of-00004-5852b56a2bd28fd9.parquet",
"data/train-00002-of-00004-a26307300439e943.parquet",
"data/train-00003-of-00004-d243063613e5a057.parquet"
],
"output_dir": "runs/qwen3_next_3m_fix2_100p_1epoch",
"max_rows": 0,
"data_fraction": 1.0,
"vocab_size": 1024,
"base_vocab_size": 1000,
"min_frequency": 2,
"legacy_tokenizer": true,
"legacy_special_token_ids": true,
"architecture": "qwen3_next",
"hidden_size": 216,
"intermediate_size": 540,
"moe_intermediate_size": 54,
"shared_expert_intermediate_size": 54,
"num_hidden_layers": 4,
"num_attention_heads": 8,
"num_key_value_heads": 1,
"head_dim": 56,
"max_position_embeddings": 1024,
"attention_bias": false,
"freeze_random_qkv_bias": false,
"qkv_bias_init_range": 0.2,
"attention_dropout": 0.0,
"rms_norm_eps": 1e-06,
"rope_theta": 10000000.0,
"partial_rotary_factor": 0.25,
"use_cache": false,
"tie_word_embeddings": true,
"decoder_sparse_step": 1,
"mlp_only_layers": "",
"num_local_experts": 8,
"num_experts_per_tok": 2,
"norm_topk_prob": true,
"output_router_logits": true,
"router_aux_loss_coef": 0.01,
"layer_types": "",
"full_attention_interval": 4,
"linear_conv_kernel_dim": 4,
"linear_key_head_dim": 54,
"linear_value_head_dim": 54,
"linear_num_key_heads": 4,
"linear_num_value_heads": 8,
"block_size": 256,
"batch_size": 16,
"max_steps": 152568,
"num_epochs": 1.0,
"learning_rate": 0.0003,
"weight_decay": 0.0,
"grad_clip": 1.0,
"warmup_steps": 1000,
"min_lr_ratio": 0.1,
"validation_fraction": 0.01,
"log_steps": 100,
"eval_steps": 5000,
"eval_batches": 16,
"save_steps": 10000,
"resume_from_checkpoint": "",
"seed": 1234,
"device": "cuda",
"dtype": "float32",
"num_workers": 0,
"generate_new_tokens": 100,
"generate_prompts": [
"Once upon",
"There was a little",
"One day"
],
"generation_temperature": 0.8,
"generation_top_p": 0.95,
"generation_top_k": 40,
"generation_repetition_penalty": 1.1,
"do_sample": true
},
"config": {
"transformers_version": "5.14.1",
"architectures": [
"Qwen3NextForCausalLM"
],
"output_hidden_states": false,
"return_dict": true,
"dtype": "float32",
"chunk_size_feed_forward": 0,
"is_encoder_decoder": false,
"id2label": {
"0": "LABEL_0",
"1": "LABEL_1"
},
"label2id": {
"LABEL_0": 0,
"LABEL_1": 1
},
"problem_type": null,
"vocab_size": 1024,
"hidden_size": 216,
"intermediate_size": 540,
"num_hidden_layers": 4,
"num_attention_heads": 8,
"num_key_value_heads": 1,
"hidden_act": "silu",
"max_position_embeddings": 1024,
"initializer_range": 0.02,
"rms_norm_eps": 1e-06,
"use_cache": false,
"tie_word_embeddings": true,
"rope_parameters": {
"rope_type": "default",
"rope_theta": 10000000.0,
"partial_rotary_factor": 0.25
},
"attention_bias": false,
"attention_dropout": 0.0,
"head_dim": 56,
"linear_conv_kernel_dim": 4,
"linear_key_head_dim": 54,
"linear_value_head_dim": 54,
"linear_num_key_heads": 4,
"linear_num_value_heads": 8,
"decoder_sparse_step": 1,
"moe_intermediate_size": 54,
"shared_expert_intermediate_size": 54,
"num_experts_per_tok": 2,
"num_experts": 8,
"norm_topk_prob": true,
"output_router_logits": true,
"router_aux_loss_coef": 0.01,
"mlp_only_layers": [],
"layer_types": [
"linear_attention",
"linear_attention",
"linear_attention",
"full_attention"
],
"pad_token_id": 1000,
"bos_token_id": 1000,
"eos_token_id": 1001,
"_name_or_path": "",
"use_sliding_window": false,
"sliding_window": null,
"partial_rotary_factor": 0.25,
"model_type": "qwen3_next",
"output_attentions": false
},
"generations": {
"Once upon": "Once upon a time, there was a mighty man. He liked to count things and shout out loud. One day he decided to go on an adventure in the forest. \n\nHe went into a dark forest and saw many trees that were all around him. The first man was very excited. He wanted to find someone to give himself something special. So he ran off to find someone who could help him. \n\nThe s",
"There was a little": "There was a little girl named Lucy who lived in a small house. One day, she heard a whistle coming from the ceiling. She was so excited and wanted to see what it could do.\n\nLucy went up to the sound and suddenly she saw a big tree. It had lots of junk inside! The tree looked like it was going to perform for her friend and her friend. They climbed the tree together and L",
"One day": "One day, a boy named Tim went for a walk. He saw his friend, Sam, who was also tall and strong.\n\n\"Hi Sam!\" said Tim. \"I want to be my friend.\"\n\nSam looked at Tim. \"You can share the ball with me,\" he said. \"Thank you for sharing the ball with me.\"\n\nTim and Sam decided to share the ball. They took turns pulling and sharing"
}
} |