license, language, tags, base_model
license language tags base_model
apache-2.0
en
text-to-sql
code
sql
fine-tuned
unsloth
lora
Snowflake/Arctic-Text2SQL-R1-7B

Snowflake/Arctic-Text2SQL-R1-7B Fine-tuned for NL2SQL++ v5.8.1_cold_start

This model is a fine-tuned version of Snowflake/Arctic-Text2SQL-R1-7B on the NL2SQL++ v5.8.1_cold_start dataset with code-with-thought reasoning.

Model Details

  • Base Model: Snowflake/Arctic-Text2SQL-R1-7B
  • Task: Text-to-SQL generation
  • Dataset: NL2SQL++ v5.8.1_cold_start with code-with-thought reasoning
  • Fine-tuning Method: LoRA (Low-Rank Adaptation) with Unsloth
  • Quantization: 16-bit merged weights
  • Training Dataset Size: 1149 examples
  • Validation Dataset Size: 0 examples

Training Configuration

  • output_dir: ./saved_models
  • per_device_train_batch_size: 8
  • num_train_epochs: 1.5
  • max_steps: -1
  • learning_rate: 1e-06
  • lr_scheduler_type: SchedulerType.COSINE
  • lr_scheduler_kwargs: None
  • warmup_steps: 0.1
  • optim: OptimizerNames.ADAMW_TORCH_FUSED
  • optim_args: None
  • weight_decay: 0.01
  • adam_beta1: 0.9
  • adam_beta2: 0.999
  • adam_epsilon: 1e-08
  • optim_target_modules: None
  • gradient_accumulation_steps: 2
  • average_tokens_across_devices: True
  • max_grad_norm: 1.0
  • label_smoothing_factor: 0.0
  • bf16: True
  • fp16: False
  • bf16_full_eval: True
  • fp16_full_eval: False
  • tf32: None
  • gradient_checkpointing: True
  • gradient_checkpointing_kwargs: None
  • torch_compile: False
  • torch_compile_backend: None
  • torch_compile_mode: None
  • use_liger_kernel: False
  • liger_kernel_config: None
  • use_cache: False
  • neftune_noise_alpha: None
  • torch_empty_cache_steps: None
  • auto_find_batch_size: False
  • logging_strategy: IntervalStrategy.STEPS
  • logging_steps: 3
  • logging_first_step: False
  • log_on_each_node: True
  • logging_nan_inf_filter: True
  • include_num_input_tokens_seen: no
  • log_level: passive
  • log_level_replica: warning
  • disable_tqdm: False
  • report_to: ['wandb']
  • run_name: None
  • project: huggingface
  • trackio_space_id: trackio
  • eval_strategy: no
  • eval_steps: 30
  • eval_delay: 0
  • per_device_eval_batch_size: 5
  • prediction_loss_only: False
  • eval_on_start: False
  • eval_do_concat_batches: True
  • eval_use_gather_object: False
  • eval_accumulation_steps: 10
  • include_for_metrics: []
  • batch_eval_metrics: False
  • save_only_model: False
  • save_strategy: no
  • save_steps: 30
  • save_on_each_node: False
  • save_total_limit: 1
  • enable_jit_checkpoint: False
  • push_to_hub: False
  • hub_token: None
  • hub_private_repo: None
  • hub_model_id: None
  • hub_strategy: HubStrategy.EVERY_SAVE
  • hub_always_push: False
  • hub_revision: None
  • load_best_model_at_end: False
  • metric_for_best_model: eval_loss
  • greater_is_better: False
  • ignore_data_skip: False
  • restore_callback_states_from_checkpoint: False
  • full_determinism: False
  • seed: 42
  • data_seed: None
  • use_cpu: False
  • accelerator_config: AcceleratorConfig(split_batches=False, dispatch_batches=None, even_batches=True, use_seedable_sampler=True, non_blocking=False, gradient_accumulation_kwargs=None, use_configured_state=False)
  • parallelism_config: None
  • dataloader_drop_last: False
  • dataloader_num_workers: 0
  • dataloader_pin_memory: True
  • dataloader_persistent_workers: False
  • dataloader_prefetch_factor: None
  • remove_unused_columns: True
  • label_names: None
  • train_sampling_strategy: random
  • length_column_name: length
  • ddp_find_unused_parameters: None
  • ddp_bucket_cap_mb: None
  • ddp_broadcast_buffers: None
  • ddp_backend: None
  • ddp_timeout: 1800
  • fsdp: []
  • fsdp_config: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
  • deepspeed: None
  • debug: []
  • skip_memory_metrics: True
  • do_train: False
  • do_eval: True
  • do_predict: False
  • resume_from_checkpoint: None
  • warmup_ratio: 0.1
  • logging_dir: None
  • local_rank: -1
  • model_init_kwargs: None
  • chat_template_path: None
  • dataset_text_field: text
  • dataset_kwargs: None
  • dataset_num_proc: None
  • eos_token: None
  • pad_token: None
  • max_length: 30000
  • packing: False
  • packing_strategy: bfd
  • padding_free: False
  • pad_to_multiple_of: None
  • eval_packing: None
  • completion_only_loss: None
  • assistant_only_loss: False
  • loss_type: nll
  • activation_offloading: False
  • vllm_sampling_params: None
  • unsloth_num_chunks: -1
  • unsloth_logit_chunk_multiplier: None
  • unsloth_grpo_mini_batch: None
  • max_seq_length: 30000
  • model_name: Snowflake/Arctic-Text2SQL-R1-7B
  • model_specs: ModelSpecs(instruction_part='<|im_start|>user', response_part='<|im_start|>assistant', target_modules=['q_proj', 'k_proj', 'v_proj', 'o_proj', 'gate_proj', 'up_proj', 'down_proj'], chat_template=None)
  • lora_use_rslora: True
  • lora_r: 64
  • lora_alpha: 256
  • lora_dropout: 0.1
  • early_stopping_patience: 5

Train Dataset Example

<|im_start|>system
You are a helpful AI Assistant that provides well-reasoned and detailed responses. You first
think about the reasoning process as an internal monologue and then provide the user with
the answer. Respond in the following format: <think>
...
</think>
<answer>
...
</answer>
<|im_end|>
<|im_start|>user
You are a Couchbase SQL++ query expert. Given a database schema and a natural language question, generate a syntactically valid SQL++ query that precisely answers the question.

Rules:
- SELECT only the columns explicitly asked for — nothing more, nothing less
- Use the exact bucket, scope, and collection names provided in the database schema

Bucket Name:
``

Scope Name:
``

Database Schema:
{}

This schema describes the structure of the data in the specified bucket and scope. It includes information about the collections, fields, and their data types.

Question:
Show key-value pairs with type information for the inline object that contains flight and utc, as outer_pairs.
<|im_end|>
<|im_start|>assistant
<think>
I read the question as asking for a function-style transformation, not a table lookup. There is no schema at all here, which is a clue that I am not supposed to read from any collection. So I do not need a FROM clause, any joins, or any filtering conditions. This is just about constructing an inline object and then showing its key-value pairs.

The phrase “the inline object that contains flight and utc” tells me the object keys themselves should be named flight and utc. Since no source data is provided for their values, I need to choose representative literals. For flight, I want something that looks like a realistic flight designator, so I can use a short airline-style code with digits; AI444 is a reasonable made-up example. For utc, the key name suggests a time value, and because this is still just an inline demonstration rather than a typed timestamp column, a simple time-like string is fine; 4:44:44 is a compact illustrative value.

Now I need “key-value pairs with type information.” In SQL++ / N1QL, the function that turns an object into its key-value pair representation is OBJECT_PAIRS. By default that gives the pairs, but the wording explicitly asks for type information too, so I need to enable the option that includes types. That means passing a second argument as an options object with the types flag set to true. In N1QL object literal syntax, that options object is a small inline object whose key is types and whose value is the boolean TRUE.

The result also needs to be named “as outer_pairs.” That sounds like the output column alias, so the SELECT expression should be aliased to outer_pairs.

So I build a SELECT with a single expression: call OBJECT_PAIRS on the inline object {"flight": "AI444", "utc": "4:44:44"}, pass the options object {"types": TRUE}, and alias the result as outer_pairs.
</think>

<answer>
SELECT OBJECT_PAIRS({"flight": "AI444", "utc": "4:44:44"},{"types":TRUE}) AS outer_pairs;
</answer>
<|im_end|>

Description
Model synced from source: jastorj/couchmind-v5.8.1_cold_start-cw-30K-16bit
Readme 34 KiB
Languages
Jinja 100%