Add files using upload-large-folder tool
Browse filesFiles changed (10)
- .gitattributes+3
- .metadataAdded+3
- __0_0.distcpAdded+3
- common.ptAdded+3
- metadata.jsonAdded+1
- run_config.yamlAdded+666
- tokenizer/chat_template.jinjaAdded+154
- tokenizer/tokenizer.jsonAdded+3
- tokenizer/tokenizer_config.jsonAdded+34
- train_state.ptAdded+3
32 unmodified lines33343536373832 unmodified lines*.zip filter=lfs diff=lfs merge=lfs -text*.zst filter=lfs diff=lfs merge=lfs -text*tfevents* filter=lfs diff=lfs merge=lfs -text.metadata filter=lfs diff=lfs merge=lfs -texttokenizer/tokenizer.json filter=lfs diff=lfs merge=lfs -text__0_0.distcp filter=lfs diff=lfs merge=lfs -text123version https://git-lfs.github.com/spec/v1oid sha256:3d92db4d020440aa043f898c4acc40c46e34d7565015f4103c531595faa7b930size 257851123version https://git-lfs.github.com/spec/v1oid sha256:5116d9a4aec7407bce8f102ddd0aa152c045179e498f3e20f4bbad53f2b90d41size 9321437622123version https://git-lfs.github.com/spec/v1oid sha256:3203c48c508d56071331991ba182a42afd9d7c88152a2c2b4bdc62213519008fsize 13831{"sharded_backend": "torch_dist", "sharded_backend_version": 1, "common_backend": "torch", "common_backend_version": 1}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666_target_: megatron.bridge.training.config.ConfigContainercheckpoint: _target_: megatron.bridge.training.config.CheckpointConfig async_ckpt_cpu_priority: 10 async_ckpt_io_priority: 3 async_ckpt_use_cpu_shm: false async_save: false async_strategy: mcore async_write_results_mp_mode: fork auto_detect_ckpt_format: false ckpt_assume_constant_structure: false ckpt_convert_format: null ckpt_convert_save: null ckpt_convert_update_legacy_dist_opt_format: false ckpt_format: torch_dist ckpt_fully_parallel_load_exchange_algo: broadcast ckpt_fully_parallel_load_process_group: dp ckpt_fully_parallel_save_process_group: dp ckpt_load_validate_sharding_integrity: true ckpt_step: null custom_manager_class: null dist_ckpt_optim_fully_reshardable: true dist_ckpt_save_pre_mcore_014: false dist_ckpt_strictness: assume_ok_unexpected dist_ckpt_workers: 1 distrib_optim_fully_reshardable_mem_efficient: false exit_on_missing_checkpoint: false finetune: false fully_parallel_load: false fully_parallel_save: true load: null load_main_params_from_ckpt: false load_optim: true load_rng: true most_recent_k: -1 non_persistent_ckpt_type: null non_persistent_global_ckpt_dir: null non_persistent_local_ckpt_algo: fully_parallel non_persistent_local_ckpt_dir: null non_persistent_save_interval: null pretrained_checkpoint: null replication: false replication_factor: 2 replication_jump: null save: /home/junjie.ye/workspace/humanoid_research/cua/models/checkpoints/slides01_aw_init_from_3x422_func_v1 save_activations_interval: null save_dgrads_interval: null save_interval: null save_optim: false save_params_interval: null save_retain_interval: null save_rng: false save_tokenizer_assets: true save_tokens_per_expert_interval: null save_wgrads_interval: null storage_writers_per_rank: 1 strict_fsdp_dtensor_load: false use_checkpoint_args: false use_mp_args_from_checkpoint_args: false use_persistent_ckpt_worker: true use_tokenizer_model_from_checkpoint_args: true verify_integrity: falsecomm_overlap: nulldataset: nullddp: nulldist: nullft: nullinprocess_restart: nulllogger: _target_: megatron.bridge.training.config.LoggerConfig barrier_with_L1_time: true comet_api_key: null comet_experiment_name: null comet_project: null comet_tags: null comet_workspace: null filter_warnings: true log_device_memory_used: false log_energy: false log_interval: 100 log_l2_norm_grad_to_tensorboard: false log_loss_scale_to_tensorboard: true log_max_attention_logit: false log_memory_interval: null log_memory_to_tensorboard: false log_num_zeros_in_grad: false log_params_norm: false log_progress: false log_runtime_to_tensorboard: false log_throughput: false log_throughput_to_tensorboard: false log_timers_to_tensorboard: false log_validation_ppl_to_tensorboard: false log_world_size_to_tensorboard: false logging_level: 20 memory_keys: null mlflow_description: null mlflow_experiment: null mlflow_log_artifacts: true mlflow_run_name: null mlflow_tags: null mlflow_tracking_uri: null modules_to_filter: null runtime_time_unit: hours save_config_filepath: null set_level_for_all_loggers: false skip_train_metrics_log: false tensorboard_dir: null tensorboard_log_interval: 1 tensorboard_queue_size: 1000 throughput_window_size: 100 timing_log_level: 0 timing_log_option: minmax wandb_entity: null wandb_exp_name: null wandb_project: null wandb_save_dir: nullmixed_precision: nullmodel: _target_: megatron.bridge.models.qwen_vl.qwen35_vl_provider.Qwen35VLModelProvider account_for_embedding_in_pipeline_split: false account_for_loss_in_pipeline_split: false activation_func: _call_: false _target_: torch.nn.functional.silu activation_func_clamp_value: null activation_func_fp8_input_store: false add_bias_linear: false add_qkv_bias: false apply_query_key_layer_scaling: false apply_residual_connection_post_layernorm: false apply_rope_fusion: false apply_rotary_pos_emb_in_fp32: false attention_backend: _args_: - 5 _call_: true _name_: auto _target_: megatron.core.transformer.enums.AttnBackend attention_dropout: 0.0 attention_output_gate: true attention_softmax_in_fp32: true autocast_dtype: _call_: false _target_: torch.bfloat16 barrier_with_L1_time: true batch_invariant_mode: false batch_p2p_comm: true batch_p2p_sync: true bf16: true bias_activation_fusion: true bias_dropout_fusion: false bos_token_id: null calculate_per_token_loss: false clone_scatter_output_in_embedding: true config_logger_dir: '' context_parallel_size: 1 cp_comm_type: null cpu_offloading: false cpu_offloading_activations: true cpu_offloading_double_buffering: false cpu_offloading_num_layers: 0 cpu_offloading_retain_pinned_cpu_buffers: false cpu_offloading_weights: false cross_entropy_fusion_impl: native cross_entropy_loss_fusion: true cuda_graph_impl: none cuda_graph_modules: [] cuda_graph_retain_backward_graph: false cuda_graph_scope: null cuda_graph_use_single_mempool: true cuda_graph_warmup_steps: 3 deallocate_pipeline_outputs: true defer_embedding_wgrad_compute: false delay_wgrad_compute: false dense_grouped_gemm: false deterministic_mode: false disable_bf16_reduced_precision_matmul: false disable_parameter_transpose_cache: false distribute_saved_activations: false dsa_indexer_head_dim: null dsa_indexer_loss_coeff: null dsa_indexer_n_heads: null dsa_indexer_topk: null dsa_indexer_use_sparse_loss: false embedding_init_method: _args_: [] _partial_: true _target_: torch.nn.init.normal_ mean: 0.0 std: 0.02 embedding_init_method_std: 0.02 enable_autocast: false enable_cuda_graph: false eos_token_id: 248044 ep_overlap_early_attn_memory_release: false experimental_attention_variant: gated_delta_net expert_model_parallel_size: 1 expert_tensor_parallel_size: 1 external_cuda_graph: false ffn_hidden_size: 9216 finalize_model_grads_func: null fine_grained_activation_offloading: false fine_grained_offloading_max_inflight_offloads: null first_last_layers_bf16: false flash_decode: false fp16: false fp16_lm_cross_entropy: false fp32_residual_connection: false fp4: null fp4_param: false fp4_quantizer_factory: null fp4_recipe: nvfp4 fp8: null fp8_amax_compute_algo: most_recent fp8_amax_history_len: 1 fp8_dot_product_attention: false fp8_interval: 1 fp8_margin: 0 fp8_multi_head_attention: false fp8_output_proj: false fp8_param: false fp8_quantizer_factory: null fp8_recipe: delayed fp8_wgrad: true freeze_language_model: false freeze_vision_model: false freeze_vision_projection: false fused_residual_rmsnorm: false fused_single_qkv_rope: false gated_linear_unit: true glu_linear_offset: 0.0 grad_scale_func: null grad_sync_func: null gradient_accumulation_fusion: false hetereogenous_dist_checkpoint: true heterogeneous_block_specs: false hf_model_id: /home/junjie.ye/workspace/humanoid_research/cua/models/hf_exports/qwen35-vl-4b-cua-3x-full-func-nothink-1ep-20260907/iter_0000422 hidden_dropout: 0.0 hidden_size: 2560 hierarchical_context_parallel_sizes: null high_priority_a2a_comm_stream: false hybrid_context_parallel: false image_token_id: 248056 inference_cuda_graph_scope: _args_: - 1 _call_: true _name_: none _target_: megatron.core.transformer.enums.InferenceCudaGraphScope inference_disable_triton_nvls_kernels: false inference_fuse_tp_communication: false inference_grouped_gemm_backend: vllm inference_moe_disable_fused_quant_kernels: false inference_moe_token_dispatcher_type: nvls inference_rng_tracker: false inference_sampling_seed: 42 init_method: _args_: [] _partial_: true _target_: torch.nn.init.normal_ mean: 0.0 std: 0.02 init_method_std: 0.02 init_model_with_meta_device: false is_hybrid_model: false kitchen_attention_backend: sdpa kv_channels: 256 language_max_sequence_length: 2048 layernorm_epsilon: 1.0e-06 layernorm_zero_centered_gamma: true linear_attention_freq: 4 linear_conv_kernel_dim: 4 linear_key_head_dim: 128 linear_num_key_heads: 16 linear_num_value_heads: 32 linear_value_head_dim: 128 log_max_attention_logit: false make_vocab_size_divisible_by: 128 mamba_head_dim: 64 mamba_num_groups: 8 mamba_num_heads: null mamba_state_dim: 128 masked_softmax_fusion: true max_seqlen_per_dp_cp_rank: null memory_efficient_layer_norm: false microbatch_group_size_per_vp_stage: 1 min_offloaded_tensor_size: 1048576 mlp_chunks_for_prefill: 1 mlp_chunks_for_training: 1 moe_apply_probs_on_input: false moe_aux_loss_coeff: 0.0 moe_deepep_num_sms: 20 moe_enable_deepep: false moe_enable_routing_replay: false moe_expert_capacity_factor: null moe_expert_rank_capacity_factor: null moe_ffn_hidden_size: null moe_flex_dispatcher_backend: deepep moe_grouped_gemm: false moe_hybridep_num_blocks_permute: null moe_hybridep_num_blocks_unpermute: null moe_hybridep_num_sms: null moe_hybridep_num_sms_preprocessing: 108 moe_input_jitter_eps: null moe_latent_size: null moe_layer_freq: 1 moe_layer_recompute: false moe_mlp_glu_interleave_size: null moe_pad_expert_input_to_capacity: false moe_pad_experts_for_cuda_graph_inference: false moe_paged_stash: false moe_paged_stash_buffer_size_factor_cpu: 0.0 moe_paged_stash_buffer_size_factor_cuda: 1.1 moe_paged_stash_page_size: 64 moe_per_layer_logging: false moe_permute_fusion: false moe_permute_fusion_into_hybridep: false moe_router_bias_update_rate: 0.001 moe_router_dtype: null moe_router_enable_expert_bias: false moe_router_force_biased: null moe_router_force_load_balancing: false moe_router_fusion: false moe_router_group_topk: null moe_router_load_balancing_type: aux_loss moe_router_num_groups: null moe_router_padding_for_fp8: false moe_router_padding_for_quantization: false moe_router_pre_softmax: false moe_router_score_function: softmax moe_router_topk: 2 moe_router_topk_limited_devices: null moe_router_topk_scaling_factor: null moe_shared_expert_gate: false moe_shared_expert_intermediate_size: null moe_shared_expert_overlap: false moe_single_grouped_bias: false moe_single_grouped_weight: false moe_token_dispatcher_type: allgather moe_token_drop_policy: probs moe_token_dropping: false moe_z_loss_coeff: null mrope_section: - 11 - 11 - 10 mtp_enabled: false mtp_hybrid_override_pattern: null mtp_loss_scaling_factor: 0.1 mtp_num_layers: 1 mtp_standalone: false mtp_use_repeated_layer: false multi_latent_attention: false mup_attn_scale_power: 1.0 mup_base_head_dim: null mup_base_hidden_size: null mup_embedding_mult: 1.0 mup_output_mult: 1.0 mup_width_mult: 1.0 nccl_all_reduce_for_prefill: false no_rope_freq: null no_sync_func: null normalization: RMSNorm num_attention_heads: 16 num_layers: 32 num_layers_at_end_in_bf16: 1 num_layers_at_start_in_bf16: 1 num_layers_in_first_pipeline_stage: null num_layers_in_last_pipeline_stage: null num_microbatches_with_partial_activation_checkpoints: null num_moe_experts: null num_query_groups: 4 offload_modules: [] output_layer_init_method: _args_: [] _partial_: true _target_: torch.nn.init.normal_ mean: 0.0 std: 0.0025 overlap_dispatch_backward_with_experts_wgrad: false overlap_moe_expert_parallel_comm: false overlap_p2p_comm: false overlap_p2p_comm_warmup_flush: false parallel_output: true param_sync_func: null params_dtype: _call_: false _target_: torch.bfloat16 patch_size: 16 perform_initialization: false persist_layer_norm: false pipeline_dtype: _call_: false _target_: torch.bfloat16 pipeline_model_parallel_comm_backend: null pipeline_model_parallel_layout: null pipeline_model_parallel_size: 1 position_embedding_type: mrope qk_clip: false qk_clip_alpha: 0.5 qk_clip_threshold: 100 qk_l2_norm: false qk_layernorm: true quant_recipe: null recompute_granularity: null recompute_method: null recompute_modules: - core_attn recompute_num_layers: null restore_modelopt_state: false rope_scaling: false rope_scaling_factor: 1.0 rotary_base: 10000000 rotary_interleaved: false rotary_percent: 0.25 rotary_scaling_factor: null scatter_embedding_sequence_parallel: false seq_len_interpolation_factor: null seq_length: 262144 sequence_parallel: false share_embeddings_and_output_weights: true should_pad_vocab: false softmax_scale: null softmax_type: vanilla spatial_merge_size: 2 symmetric_ar_type: null temporal_patch_size: 2 tensor_model_parallel_size: 1 test_mode: false timers: null tp_comm_atomic_ag: false tp_comm_atomic_rs: false tp_comm_bootstrap_backend: nccl tp_comm_bulk_dgrad: true tp_comm_bulk_wgrad: true tp_comm_overlap: false tp_comm_overlap_ag: true tp_comm_overlap_cfg: null tp_comm_overlap_disable_fc1: false tp_comm_overlap_disable_qkv: false tp_comm_overlap_rs: true tp_comm_overlap_rs_dgrad: false tp_comm_split_ag: true tp_comm_split_rs: true tp_only_amax_red: false transformer_impl: transformer_engine transformer_layer_spec: _call_: false _target_: megatron.core.models.gpt.experimental_attention_variant_module_specs.get_transformer_block_with_experimental_attention_variant_spec use_arbitrary_attention_mask: null use_cpu_initialization: false use_fused_weighted_squared_relu: false use_grouped_gemm_for_dense_mlp: false use_hf_vision_model: false use_inference_optimized_layers: false use_kitchen: false use_kitchen_attention: false use_mamba_mem_eff_path: true use_mup: false use_ring_exchange_p2p: false use_te_activation_func: false use_te_rng_tracker: false use_transformer_engine_full_layer_spec: false use_transformer_engine_op_fuser: false variable_seq_lengths: false video_token_id: 248057 virtual_pipeline_model_parallel_size: null vision_config: _target_: transformers.models.qwen3_5.configuration_qwen3_5.Qwen3_5VisionConfig architectures: null chunk_size_feed_forward: 0 depth: 24 dtype: _call_: false _target_: torch.bfloat16 hidden_act: gelu_pytorch_tanh hidden_size: 1024 id2label: 0: LABEL_0 1: LABEL_1 in_channels: 3 initializer_range: 0.02 intermediate_size: 4096 is_encoder_decoder: false label2id: LABEL_0: 0 LABEL_1: 1 num_heads: 16 num_position_embeddings: 2304 out_hidden_size: 2560 output_hidden_states: false patch_size: 16 problem_type: null return_dict: true spatial_merge_size: 2 temporal_patch_size: 2 transformers_version: null vision_dp_when_cp: false vision_end_token_id: 248054 vision_start_token_id: 248053 vocab_size: 248320 wgrad_deferral_limit: 0 window_attn_skip_freq: null window_size: null yarn_beta_fast: null yarn_beta_slow: null yarn_correction_range_round_to_int: null yarn_mscale: null yarn_mscale_all_dim: null yarn_original_max_position_embeddings: null yarn_rotary_scaling_factor: nullnvrx_straggler: nulloptimizer: _target_: megatron.core.optimizer.optimizer_config.OptimizerConfig adam_beta1: 0.9 adam_beta2: 0.999 adam_eps: 1.0e-08 adaptive_muon_beta2: 0.95 adaptive_muon_eps: 1.0e-08 adaptive_muon_moment2_method: adamuon apply_wd_to_qk_layernorm: false barrier_with_L1_time: false bf16: false clip_grad: 1.0 config_logger_dir: '' decoupled_lr: null decoupled_min_lr: null decoupled_weight_decay: true exp_avg_dtype: _call_: false _target_: torch.float32 exp_avg_sq_dtype: _call_: false _target_: torch.float32 fp16: false fp8_recipe: null grad_norm_skip_threshold: .inf hysteresis: 2 initial_loss_scale: 4294967296 lion_beta1: 0.95 lion_beta2: 0.98 log_num_zeros_in_grad: false loss_scale: null loss_scale_window: 1000 lr: null main_grads_dtype: _call_: false _target_: torch.float32 main_params_dtype: _call_: false _target_: torch.float32 min_loss_scale: 1.0 min_lr: null muon_coefficient_type: quintic muon_extra_scale_factor: 1.0 muon_fp32_matmul_prec: medium muon_momentum: 0.95 muon_nesterov: false muon_num_ns_steps: 5 muon_scalar_optimizer: adam muon_scale_mode: spectral muon_split_qkv: true muon_tp_mode: blockwise optimizer: adam optimizer_cpu_offload: false optimizer_cuda_graph: false optimizer_offload_fraction: 0.0 overlap_cpu_optimizer_d2h_h2d: false overlap_param_gather: false overlap_param_gather_with_optimizer_step: false params_dtype: _call_: false _target_: torch.float32 pin_cpu_grads: true pin_cpu_params: true reuse_grad_buf_for_mxfp8_param_ag: false sgd_momentum: 0.9 soap_precondition_frequency: 1 soap_shampoo_beta: 0.95 soap_use_kl_shampoo: true store_param_remainders: true timers: null use_distributed_optimizer: false use_layer_wise_distributed_optimizer: false use_precision_aware_optimizer: false use_torch_optimizer_for_cpu_offload: false weight_decay: 0.01optimizer_config_override_provider: _target_: megatron.bridge.training.config.OptimizerConfigOverrideProviderpeft: nullprofiling: _target_: megatron.bridge.training.config.ProfilingConfig memory_snapshot_path: /nemo_run/snapshot.pickle nvtx_ranges: false profile_ranks: - 0 profile_step_end: 12 profile_step_start: 10 pytorch_profiler_collect_callstack: false pytorch_profiler_collect_chakra: false pytorch_profiler_collect_shapes: false record_memory_history: false record_shapes: false use_nsys_profiler: false use_pytorch_profiler: falsererun_state_machine: _target_: megatron.bridge.training.config.RerunStateMachineConfig check_for_nan_in_loss: true check_for_spiky_loss: false error_injection_rate: 0 error_injection_type: transient_error rerun_mode: disabled spiky_loss_factor: 10.0rng: _target_: megatron.training.config.common_config.RNGConfig data_parallel_random_init: false inference_rng_tracker: false seed: 1234 te_rng_tracker: falsescheduler: nullstraggler: nulltensor_inspect: nulltokenizer: _target_: megatron.bridge.training.tokenizers.config.TokenizerConfig chat_template: null force_system_message: false hf_tokenizer_kwargs: {} image_tag_type: null make_vocab_size_divisible_by: 1 merge_file: null metadata_path: null null_tokenizer_eod_id: null null_tokenizer_pad_id: -1 pad_vocab_size: false padded_vocab_size: null rank: 0 sp_tokenizer_kwargs: {} special_tokens: null tensor_model_parallel_size: 1 tiktoken_num_special_tokens: 1000 tiktoken_pattern: null tokenizer_hf_no_include_special_tokens: false tokenizer_hf_no_use_fast: false tokenizer_model: /home/junjie.ye/workspace/humanoid_research/cua/models/hf_exports/qwen35-vl-4b-cua-3x-full-func-nothink-1ep-20260907/iter_0000422 tokenizer_prompt_format: null tokenizer_sentencepiece_ignore_extra_whitespaces: true tokenizer_sentencepiece_legacy: false tokenizer_type: HuggingFaceTokenizer trust_remote_code: false vocab_extra_ids: 0 vocab_file: null vocab_size: nulltrain: nullvalidation: _target_: megatron.training.config.training_config.ValidationConfig eval_global_batch_size: null eval_interval: null eval_iters: 100 eval_micro_batch_size: null full_validation: false multiple_validation_sets: false skip_train: false start_eval_at_iter: null test_mode: false validation_set_names: null123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154{%- set image_count = namespace(value=0) %}{%- set video_count = namespace(value=0) %}{%- macro render_content(content, do_vision_count, is_system_content=false) %} {%- if content is string %} {{- content }} {%- elif content is iterable and content is not mapping %} {%- for item in content %} {%- if 'image' in item or 'image_url' in item or item.type == 'image' %} {%- if is_system_content %} {{- raise_exception('System message cannot contain images.') }} {%- endif %} {%- if do_vision_count %} {%- set image_count.value = image_count.value + 1 %} {%- endif %} {%- if add_vision_id %} {{- 'Picture ' ~ image_count.value ~ ': ' }} {%- endif %} {{- '<|vision_start|><|image_pad|><|vision_end|>' }} {%- elif 'video' in item or item.type == 'video' %} {%- if is_system_content %} {{- raise_exception('System message cannot contain videos.') }} {%- endif %} {%- if do_vision_count %} {%- set video_count.value = video_count.value + 1 %} {%- endif %} {%- if add_vision_id %} {{- 'Video ' ~ video_count.value ~ ': ' }} {%- endif %} {{- '<|vision_start|><|video_pad|><|vision_end|>' }} {%- elif 'text' in item %} {{- item.text }} {%- else %} {{- raise_exception('Unexpected item type in content.') }} {%- endif %} {%- endfor %} {%- elif content is none or content is undefined %} {{- '' }} {%- else %} {{- raise_exception('Unexpected content type.') }} {%- endif %}{%- endmacro %}{%- if not messages %} {{- raise_exception('No messages provided.') }}{%- endif %}{%- if tools and tools is iterable and tools is not mapping %} {{- '<|im_start|>system\n' }} {{- "# Tools\n\nYou have access to the following functions:\n\n<tools>" }} {%- for tool in tools %} {{- "\n" }} {{- tool | tojson }} {%- endfor %} {{- "\n</tools>" }} {{- '\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n<tool_call>\n<function=example_function_name>\n<parameter=example_parameter_1>\nvalue_1\n</parameter>\n<parameter=example_parameter_2>\nThis is the value for the second parameter\nthat can span\nmultiple lines\n</parameter>\n</function>\n</tool_call>\n\n<IMPORTANT>\nReminder:\n- Function calls MUST follow the specified format: an inner <function=...></function> block must be nested within <tool_call></tool_call> XML tags\n- Required parameters MUST be specified\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\n- If there is no function call available, answer the question like normal with your current knowledge and do not tell the user about function calls\n</IMPORTANT>' }} {%- if messages[0].role == 'system' %} {%- set content = render_content(messages[0].content, false, true)|trim %} {%- if content %} {{- '\n\n' + content }} {%- endif %} {%- endif %} {{- '<|im_end|>\n' }}{%- else %} {%- if messages[0].role == 'system' %} {%- set content = render_content(messages[0].content, false, true)|trim %} {{- '<|im_start|>system\n' + content + '<|im_end|>\n' }} {%- endif %}{%- endif %}{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}{%- for message in messages[::-1] %} {%- set index = (messages|length - 1) - loop.index0 %} {%- if ns.multi_step_tool and message.role == "user" %} {%- set content = render_content(message.content, false)|trim %} {%- if not(content.startswith('<tool_response>') and content.endswith('</tool_response>')) %} {%- set ns.multi_step_tool = false %} {%- set ns.last_query_index = index %} {%- endif %} {%- endif %}{%- endfor %}{%- if ns.multi_step_tool %} {{- raise_exception('No user query found in messages.') }}{%- endif %}{%- for message in messages %} {%- set content = render_content(message.content, true)|trim %} {%- if message.role == "system" %} {%- if not loop.first %} {{- raise_exception('System message must be at the beginning.') }} {%- endif %} {%- elif message.role == "user" %} {{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }} {%- elif message.role == "assistant" %} {%- set reasoning_content = '' %} {%- if message.reasoning_content is string %} {%- set reasoning_content = message.reasoning_content %} {%- else %} {%- if '</think>' in content %} {%- set reasoning_content = content.split('</think>')[0].rstrip('\n').split('<think>')[-1].lstrip('\n') %} {%- set content = content.split('</think>')[-1].lstrip('\n') %} {%- endif %} {%- endif %} {%- set reasoning_content = reasoning_content|trim %} {%- if loop.index0 > ns.last_query_index %} {{- '<|im_start|>' + message.role + '\n<think>\n' + reasoning_content + '\n</think>\n\n' + content }} {%- else %} {{- '<|im_start|>' + message.role + '\n' + content }} {%- endif %} {%- if message.tool_calls and message.tool_calls is iterable and message.tool_calls is not mapping %} {%- for tool_call in message.tool_calls %} {%- if tool_call.function is defined %} {%- set tool_call = tool_call.function %} {%- endif %} {%- if loop.first %} {%- if content|trim %} {{- '\n\n<tool_call>\n<function=' + tool_call.name + '>\n' }} {%- else %} {{- '<tool_call>\n<function=' + tool_call.name + '>\n' }} {%- endif %} {%- else %} {{- '\n<tool_call>\n<function=' + tool_call.name + '>\n' }} {%- endif %} {%- if tool_call.arguments is defined %} {%- for args_name, args_value in tool_call.arguments|items %} {{- '<parameter=' + args_name + '>\n' }} {%- set args_value = args_value | tojson | safe if args_value is mapping or (args_value is sequence and args_value is not string) else args_value | string %} {{- args_value }} {{- '\n</parameter>\n' }} {%- endfor %} {%- endif %} {{- '</function>\n</tool_call>' }} {%- endfor %} {%- endif %} {{- '<|im_end|>\n' }} {%- elif message.role == "tool" %} {%- if loop.previtem and loop.previtem.role != "tool" %} {{- '<|im_start|>user' }} {%- endif %} {{- '\n<tool_response>\n' }} {{- content }} {{- '\n</tool_response>' }} {%- if not loop.last and loop.nextitem.role != "tool" %} {{- '<|im_end|>\n' }} {%- elif loop.last %} {{- '<|im_end|>\n' }} {%- endif %} {%- else %} {{- raise_exception('Unexpected message role.') }} {%- endif %}{%- endfor %}{%- if add_generation_prompt %} {{- '<|im_start|>assistant\n' }} {%- if enable_thinking is defined and enable_thinking is false %} {{- '<think>\n\n</think>\n\n' }} {%- else %} {{- '<think>\n' }} {%- endif %}{%- endif %}123version https://git-lfs.github.com/spec/v1oid sha256:06b9509352d2af50381ab2247e083b80d32d5c0aba91c272ca9ff729b6a0e523size 1998932512345678910111213141516171819202122232425262728293031323334{ "add_prefix_space": false, "audio_bos_token": "<|audio_start|>", "audio_eos_token": "<|audio_end|>", "audio_token": "<|audio_pad|>", "backend": "tokenizers", "bos_token": null, "clean_up_tokenization_spaces": false, "eos_token": "<|im_end|>", "errors": "replace", "image_token": "<|image_pad|>", "is_local": true, "local_files_only": true, "model_max_length": 262144, "model_specific_special_tokens": { "audio_bos_token": "<|audio_start|>", "audio_eos_token": "<|audio_end|>", "audio_token": "<|audio_pad|>", "image_token": "<|image_pad|>", "video_token": "<|video_pad|>", "vision_bos_token": "<|vision_start|>", "vision_eos_token": "<|vision_end|>" }, "pad_token": "<|endoftext|>", "pretokenize_regex": "(?i:'s|'t|'re|'ve|'m|'ll|'d)|[^\\r\\n\\p{L}\\p{N}]?[\\p{L}\\p{M}]+|\\p{N}| ?[^\\s\\p{L}\\p{M}\\p{N}]+[\\r\\n]*|\\s*[\\r\\n]+|\\s+(?!\\S)|\\s+", "processor_class": "Qwen3VLProcessor", "sep_token": "<|im_end|>", "split_special_tokens": false, "tokenizer_class": "Qwen2Tokenizer", "unk_token": null, "video_token": "<|video_pad|>", "vision_bos_token": "<|vision_start|>", "vision_eos_token": "<|vision_end|>"}123version https://git-lfs.github.com/spec/v1oid sha256:aee94cd44a5abd78b6a7dbf199b514f17967f64c0403da1e17e7891c70f95788size 3461.gitattributes+3
.metadataAdded+3
__0_0.distcpAdded+3
common.ptAdded+3
metadata.jsonAdded+1
run_config.yamlAdded+666
tokenizer/chat_template.jinjaAdded+154
tokenizer/tokenizer.jsonAdded+3
tokenizer/tokenizer_config.jsonAdded+34
train_state.ptAdded+3