Instructions to use keras/qwen_agent_world_35b_a3b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- KerasHub
How to use keras/qwen_agent_world_35b_a3b with KerasHub:
import keras_hub # Load CausalLM model (optional: use half precision for inference) causal_lm = keras_hub.models.CausalLM.from_preset("hf://keras/qwen_agent_world_35b_a3b", dtype="bfloat16") causal_lm.compile(sampler="greedy") # (optional) specify a sampler # Generate text causal_lm.generate("Keras: deep learning for", max_length=64)import keras_hub # Create a Backbone model unspecialized for any task backbone = keras_hub.models.Backbone.from_preset("hf://keras/qwen_agent_world_35b_a3b") - Keras
How to use keras/qwen_agent_world_35b_a3b with Keras:
# Available backend options are: "jax", "torch", "tensorflow". import os os.environ["KERAS_BACKEND"] = "jax" import keras model = keras.saving.load_model("hf://keras/qwen_agent_world_35b_a3b") - Notebooks
- Google Colab
- Kaggle
File size: 6,720 Bytes
62c7d34 | 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 | {
"module": "keras_hub.src.models.qwen3_5_moe.qwen3_5_moe_causal_lm",
"class_name": "Qwen3_5MoeCausalLM",
"config": {
"backbone": {
"module": "keras_hub.src.models.qwen3_5_moe.qwen3_5_moe_backbone",
"class_name": "Qwen3_5MoeBackbone",
"config": {
"name": "qwen3_5_moe_backbone",
"trainable": true,
"dtype": {
"module": "keras",
"class_name": "DTypePolicy",
"config": {
"name": "float32"
},
"registered_name": null
},
"vocabulary_size": 248320,
"num_layers": 40,
"num_query_heads": 16,
"hidden_dim": 2048,
"head_dim": 256,
"moe_intermediate_dim": 512,
"shared_expert_intermediate_size": 512,
"num_experts": 256,
"top_k": 8,
"layer_types": [
"linear_attention",
"linear_attention",
"linear_attention",
"full_attention",
"linear_attention",
"linear_attention",
"linear_attention",
"full_attention",
"linear_attention",
"linear_attention",
"linear_attention",
"full_attention",
"linear_attention",
"linear_attention",
"linear_attention",
"full_attention",
"linear_attention",
"linear_attention",
"linear_attention",
"full_attention",
"linear_attention",
"linear_attention",
"linear_attention",
"full_attention",
"linear_attention",
"linear_attention",
"linear_attention",
"full_attention",
"linear_attention",
"linear_attention",
"linear_attention",
"full_attention",
"linear_attention",
"linear_attention",
"linear_attention",
"full_attention",
"linear_attention",
"linear_attention",
"linear_attention",
"full_attention"
],
"partial_rotary_factor": 0.25,
"rope_max_wavelength": 10000000,
"rope_scaling_factor": 1.0,
"num_key_value_heads": 2,
"layer_norm_epsilon": 1e-06,
"dropout": 0.0,
"tie_word_embeddings": false,
"sliding_window_size": 32768,
"linear_num_key_heads": 16,
"linear_num_value_heads": 32,
"linear_key_head_dim": 128,
"linear_value_head_dim": 128,
"linear_conv_kernel_dim": 4,
"mrope_section": [
11,
11,
10
],
"router_aux_loss_coefficient": 0.001,
"vision_encoder": null
},
"registered_name": "keras_hub>Qwen3_5MoeBackbone"
},
"preprocessor": {
"module": "keras_hub.src.models.qwen3_5_moe.qwen3_5_moe_causal_lm_preprocessor",
"class_name": "Qwen3_5MoeCausalLMPreprocessor",
"config": {
"name": "qwen3_5_moe_causal_lm_preprocessor",
"trainable": true,
"dtype": {
"module": "keras",
"class_name": "DTypePolicy",
"config": {
"name": "float32"
},
"registered_name": null
},
"tokenizer": {
"module": "keras_hub.src.models.qwen3_5_moe.qwen3_5_moe_tokenizer",
"class_name": "Qwen3_5MoeTokenizer",
"config": {
"name": "qwen3_5_moe_tokenizer",
"trainable": true,
"dtype": {
"module": "keras",
"class_name": "DTypePolicy",
"config": {
"name": "int32"
},
"registered_name": null
},
"config_file": "tokenizer.json",
"sequence_length": null,
"add_prefix_space": false,
"unsplittable_tokens": [
"<|vision_start|>",
"<|fim_prefix|>",
"<|repo_name|>",
"<|fim_middle|>",
"<|object_ref_start|>",
"</think>",
"<|fim_suffix|>",
"</tool_response>",
"<|object_ref_end|>",
"<|im_end|>",
"<think>",
"<|vision_pad|>",
"<|file_sep|>",
"<tool_response>",
"<|quad_start|>",
"<|im_start|>",
"</tool_call>",
"<|video_pad|>",
"<|fim_pad|>",
"<|image_pad|>",
"<tool_call>",
"<|box_end|>",
"<|quad_end|>",
"<|box_start|>",
"<|endoftext|>",
"<|vision_end|>"
],
"has_vision_tokens": true
},
"registered_name": "keras_hub>Qwen3_5MoeTokenizer"
},
"config_file": "preprocessor.json",
"sequence_length": 1024,
"add_start_token": false,
"add_end_token": true,
"video_fps": 2.0
},
"registered_name": "keras_hub>Qwen3_5MoeCausalLMPreprocessor"
},
"name": "qwen3_5_moe_causal_lm"
},
"registered_name": "keras_hub>Qwen3_5MoeCausalLM"
} |