初始化项目,由ModelHub XC社区提供模型
Model: huihui-ai/MicroThinker-1B-Preview Source: Original Platform
This commit is contained in:
37
.gitattributes
vendored
Normal file
37
.gitattributes
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.arrow filter=lfs diff=lfs merge=lfs -text
|
||||
*.bin filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
||||
*.ftz filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.h5 filter=lfs diff=lfs merge=lfs -text
|
||||
*.joblib filter=lfs diff=lfs merge=lfs -text
|
||||
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
||||
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
||||
*.model filter=lfs diff=lfs merge=lfs -text
|
||||
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
||||
*.npy filter=lfs diff=lfs merge=lfs -text
|
||||
*.npz filter=lfs diff=lfs merge=lfs -text
|
||||
*.onnx filter=lfs diff=lfs merge=lfs -text
|
||||
*.ot filter=lfs diff=lfs merge=lfs -text
|
||||
*.parquet filter=lfs diff=lfs merge=lfs -text
|
||||
*.pb filter=lfs diff=lfs merge=lfs -text
|
||||
*.pickle filter=lfs diff=lfs merge=lfs -text
|
||||
*.pkl filter=lfs diff=lfs merge=lfs -text
|
||||
*.pt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pth filter=lfs diff=lfs merge=lfs -text
|
||||
*.rar filter=lfs diff=lfs merge=lfs -text
|
||||
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
||||
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
||||
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
||||
*.tar filter=lfs diff=lfs merge=lfs -text
|
||||
*.tflite filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.wasm filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
||||
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
||||
tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
||||
model.safetensors filter=lfs diff=lfs merge=lfs -text
|
||||
113
README.md
Normal file
113
README.md
Normal file
@@ -0,0 +1,113 @@
|
||||
---
|
||||
license: apache-2.0
|
||||
datasets:
|
||||
- huihui-ai/QWQ-LONGCOT-500K
|
||||
- huihui-ai/LONGCOT-Refine-500K
|
||||
base_model:
|
||||
- huihui-ai/Llama-3.2-1B-Instruct-abliterated
|
||||
tags:
|
||||
- llama3.2
|
||||
- abliterated
|
||||
- uncensored
|
||||
library_name: transformers
|
||||
pipeline_tag: text-generation
|
||||
language:
|
||||
- en
|
||||
---
|
||||
# MicroThinker-1B-Preview
|
||||
|
||||
MicroThinker-1B-Preview, a new model fine-tuned from the [huihui-ai/Llama-3.2-1B-Instruct-abliterated](https://huggingface.co/huihui-ai/Llama-3.2-1B-Instruct-abliterated) model, focused on advancing AI reasoning capabilities.
|
||||
|
||||
## Use with ollama
|
||||
|
||||
You can use [huihui_ai/microthinker](https://ollama.com/huihui_ai/microthinker) directly
|
||||
```
|
||||
ollama run huihui_ai/microthinker
|
||||
```
|
||||
|
||||
## Training Details
|
||||
|
||||
This is just a test, but the performance is quite good.
|
||||
|
||||
Now, I'll introduce the test environment.
|
||||
|
||||
The model was trained using 1 RTX 4090 GPU(24GB) .
|
||||
|
||||
The fine-tuning process used only 20,000 records from each dataset.
|
||||
|
||||
The [SFT (Supervised Fine-Tuning)](https://github.com/modelscope/ms-swift) process is divided into several steps, and no code needs to be written.
|
||||
1. Create the environment.
|
||||
|
||||
```
|
||||
conda create -yn ms-swift python=3.11
|
||||
conda activate ms-swift
|
||||
|
||||
git clone https://github.com/modelscope/ms-swift.git
|
||||
|
||||
cd ms-swift
|
||||
pip install -e .
|
||||
cd ..
|
||||
```
|
||||
|
||||
|
||||
2. Download the model and dataset.
|
||||
|
||||
```
|
||||
huggingface-cli download huihui-ai/Llama-3.2-1B-Instruct-abliterated --local-dir ./huihui-ai/Llama-3.2-1B-Instruct-abliterated
|
||||
huggingface-cli download --repo-type dataset huihui-ai/QWQ-LONGCOT-500K --local-dir ./data/QWQ-LONGCOT-500K
|
||||
huggingface-cli download --repo-type dataset huihui-ai/LONGCOT-Refine-500K --local-dir ./data/LONGCOT-Refine-500K
|
||||
```
|
||||
|
||||
|
||||
3. Used only the huihui-ai/QWQ-LONGCOT-500K dataset (#20000), Trained for 1 epoch:
|
||||
|
||||
```
|
||||
swift sft --model huihui-ai/Llama-3.2-1B-Instruct-abliterated --model_type llama3_2 --train_type lora --dataset "data/QWQ-LONGCOT-500K/qwq_500k.jsonl#20000" --torch_dtype bfloat16 --num_train_epochs 1 --per_device_train_batch_size 1 --per_device_eval_batch_size 1 --learning_rate 1e-4 --lora_rank 8 --lora_alpha 32 --target_modules all-linear --gradient_accumulation_steps 16 --eval_steps 50 --save_steps 50 --save_total_limit 2 --logging_steps 5 --max_length 16384 --output_dir output/Llama-3.2-1B-Instruct-abliterated/lora/sft --system "You are a helpful assistant. You should think step-by-step." --warmup_ratio 0.05 --dataloader_num_workers 4 --model_author "huihui-ai" --model_name "MicroThinker"
|
||||
```
|
||||
|
||||
|
||||
4. Save the fine-tuned model. After you're done, input `exit` to exit.
|
||||
Replace the directories below with specific ones.
|
||||
|
||||
```
|
||||
swift infer --model huihui-ai/Llama-3.2-1B-Instruct-abliterated --adapters output/Llama-3.2-1B-Instruct-abliterated/lora/sft/v0-20250102-153619/checkpoint-1237 --stream true --merge_lora true
|
||||
```
|
||||
|
||||
|
||||
This should create a new model directory: `checkpoint-1237-merged`, Copy or move this directory to the `huihui` directory.
|
||||
|
||||
5. Perform inference on the fine-tuned model.
|
||||
|
||||
```
|
||||
swift infer --model huihui/checkpoint-1237-merged --stream true --infer_backend pt --max_new_tokens 8192
|
||||
```
|
||||
|
||||
|
||||
6. Combined training with huihui-ai/QWQ-LONGCOT-500K (#20000) and huihui-ai/LONGCOT-Refine datasets (#20000), Trained for 1 epoch:
|
||||
|
||||
```
|
||||
swift sft --model huihui-ai/checkpoint-1237-merged --model_type llama3_2 --train_type lora --dataset "data/QWQ-LONGCOT-500K/qwq_500k.jsonl#20000" "data/LONGCOT-Refine-500K/refine_from_qwen2_5.jsonl#20000" --torch_dtype bfloat16 --num_train_epochs 1 --per_device_train_batch_size 1 --per_device_eval_batch_size 1 --learning_rate 1e-4 --lora_rank 8 --lora_alpha 32 --target_modules all-linear --gradient_accumulation_steps 16 --eval_steps 50 --save_steps 50 --save_total_limit 2 --logging_steps 5 --max_length 16384 --output_dir output/Llama-3.2-1B-Instruct-abliterated/lora/sft2 --system "You are a helpful assistant. You should think step-by-step." --warmup_ratio 0.05 --dataloader_num_workers 4 --model_author "huihui-ai" --model_name "MicroThinker"
|
||||
```
|
||||
|
||||
|
||||
7. Save the final fine-tuned model. After you're done, input `exit` to exit.
|
||||
Replace the directories below with specific ones.
|
||||
|
||||
```
|
||||
swift infer --model huihui-ai/checkpoint-1237-merged --adapters output/Llama-3.2-1B-Instruct-abliterated/lora/sft2/v0-20250103-121319/checkpoint-2474 --stream true --merge_lora true
|
||||
```
|
||||
|
||||
|
||||
This should create a new model directory: `checkpoint-2474-merged`, Rename the directory to `MicroThinker-1B-Preview`, Copy or move this directory to the `huihui` directory.
|
||||
|
||||
8. Perform inference on the final fine-tuned model.
|
||||
|
||||
```
|
||||
swift infer --model huihui/MicroThinker-1B-Preview --stream true --infer_backend pt --max_new_tokens 8192
|
||||
```
|
||||
|
||||
9. Test examples.
|
||||
|
||||
```
|
||||
How many 'r' characters are there in the word "strawberry"?
|
||||
```
|
||||
303
args.json
Normal file
303
args.json
Normal file
@@ -0,0 +1,303 @@
|
||||
{
|
||||
"model": "huihui-ai/checkpoint-1237-merged",
|
||||
"model_type": "llama3_2",
|
||||
"model_revision": null,
|
||||
"task_type": "causal_lm",
|
||||
"torch_dtype": "bfloat16",
|
||||
"attn_impl": null,
|
||||
"num_labels": null,
|
||||
"rope_scaling": null,
|
||||
"device_map": null,
|
||||
"local_repo_path": null,
|
||||
"template": "llama3_2",
|
||||
"system": "You are a helpful assistant. You should think step-by-step.",
|
||||
"max_length": 16384,
|
||||
"truncation_strategy": "delete",
|
||||
"max_pixels": null,
|
||||
"tools_prompt": "react_en",
|
||||
"padding_side": "right",
|
||||
"loss_scale": "default",
|
||||
"sequence_parallel_size": 1,
|
||||
"use_chat_template": true,
|
||||
"template_backend": "swift",
|
||||
"dataset": [
|
||||
"data/qwq_500k.jsonl#20000",
|
||||
"data/refine_from_qwen2_5.jsonl#20000"
|
||||
],
|
||||
"val_dataset": [],
|
||||
"split_dataset_ratio": 0.01,
|
||||
"data_seed": 42,
|
||||
"dataset_num_proc": 1,
|
||||
"streaming": false,
|
||||
"enable_cache": false,
|
||||
"download_mode": "reuse_dataset_if_exists",
|
||||
"strict": false,
|
||||
"model_name": [
|
||||
"huihui-ai-robot"
|
||||
],
|
||||
"model_author": [
|
||||
"huihui-ai"
|
||||
],
|
||||
"custom_dataset_info": [],
|
||||
"quant_method": null,
|
||||
"quant_bits": null,
|
||||
"hqq_axis": null,
|
||||
"bnb_4bit_compute_dtype": "bfloat16",
|
||||
"bnb_4bit_quant_type": "nf4",
|
||||
"bnb_4bit_use_double_quant": true,
|
||||
"bnb_4bit_quant_storage": null,
|
||||
"max_new_tokens": 64,
|
||||
"temperature": 0.0,
|
||||
"top_k": null,
|
||||
"top_p": null,
|
||||
"repetition_penalty": null,
|
||||
"num_beams": 1,
|
||||
"stream": false,
|
||||
"stop_words": [],
|
||||
"logprobs": false,
|
||||
"ckpt_dir": "huihui-ai/checkpoint-1237-merged",
|
||||
"load_dataset_config": null,
|
||||
"lora_modules": [],
|
||||
"tuner_backend": "peft",
|
||||
"train_type": "lora",
|
||||
"adapters": [],
|
||||
"seed": 42,
|
||||
"model_kwargs": {},
|
||||
"load_args": true,
|
||||
"load_data_args": false,
|
||||
"use_hf": false,
|
||||
"hub_token": null,
|
||||
"custom_register_path": [],
|
||||
"ignore_args_error": false,
|
||||
"use_swift_lora": false,
|
||||
"output_dir": "D:\\AITrain\\modelscope\\ms-swift\\output\\Llama-3.2-1B-Instruct-abliterated\\lora\\sft2\\v1-20250103-123828",
|
||||
"overwrite_output_dir": false,
|
||||
"do_train": false,
|
||||
"do_eval": false,
|
||||
"do_predict": false,
|
||||
"eval_strategy": "steps",
|
||||
"prediction_loss_only": false,
|
||||
"per_device_train_batch_size": 1,
|
||||
"per_device_eval_batch_size": 1,
|
||||
"per_gpu_train_batch_size": null,
|
||||
"per_gpu_eval_batch_size": null,
|
||||
"gradient_accumulation_steps": 16,
|
||||
"eval_accumulation_steps": null,
|
||||
"eval_delay": 0,
|
||||
"torch_empty_cache_steps": null,
|
||||
"learning_rate": 0.0001,
|
||||
"weight_decay": 0.1,
|
||||
"adam_beta1": 0.9,
|
||||
"adam_beta2": 0.999,
|
||||
"adam_epsilon": 1e-08,
|
||||
"max_grad_norm": 1.0,
|
||||
"num_train_epochs": 1.0,
|
||||
"max_steps": -1,
|
||||
"lr_scheduler_type": "cosine",
|
||||
"lr_scheduler_kwargs": null,
|
||||
"warmup_ratio": 0.05,
|
||||
"warmup_steps": 0,
|
||||
"log_level": "passive",
|
||||
"log_level_replica": "warning",
|
||||
"log_on_each_node": true,
|
||||
"logging_dir": "D:\\AITrain\\modelscope\\ms-swift\\output\\Llama-3.2-1B-Instruct-abliterated\\lora\\sft2\\v1-20250103-123828\\runs",
|
||||
"logging_strategy": "steps",
|
||||
"logging_first_step": true,
|
||||
"logging_steps": 5,
|
||||
"logging_nan_inf_filter": true,
|
||||
"save_strategy": "steps",
|
||||
"save_steps": 50.0,
|
||||
"save_total_limit": 2,
|
||||
"save_safetensors": true,
|
||||
"save_on_each_node": false,
|
||||
"save_only_model": false,
|
||||
"restore_callback_states_from_checkpoint": false,
|
||||
"no_cuda": false,
|
||||
"use_cpu": false,
|
||||
"use_mps_device": false,
|
||||
"jit_mode_eval": false,
|
||||
"use_ipex": false,
|
||||
"bf16": true,
|
||||
"fp16": false,
|
||||
"fp16_opt_level": "O1",
|
||||
"half_precision_backend": "auto",
|
||||
"bf16_full_eval": false,
|
||||
"fp16_full_eval": false,
|
||||
"tf32": null,
|
||||
"local_rank": -1,
|
||||
"ddp_backend": null,
|
||||
"tpu_num_cores": null,
|
||||
"tpu_metrics_debug": false,
|
||||
"debug": null,
|
||||
"dataloader_drop_last": false,
|
||||
"eval_steps": 50.0,
|
||||
"dataloader_num_workers": 4,
|
||||
"dataloader_prefetch_factor": null,
|
||||
"past_index": -1,
|
||||
"run_name": null,
|
||||
"disable_tqdm": null,
|
||||
"remove_unused_columns": false,
|
||||
"label_names": null,
|
||||
"load_best_model_at_end": false,
|
||||
"metric_for_best_model": "loss",
|
||||
"greater_is_better": false,
|
||||
"ignore_data_skip": false,
|
||||
"fsdp": "",
|
||||
"fsdp_min_num_params": 0,
|
||||
"fsdp_config": null,
|
||||
"fsdp_transformer_layer_cls_to_wrap": null,
|
||||
"accelerator_config": {
|
||||
"dispatch_batches": false
|
||||
},
|
||||
"deepspeed": null,
|
||||
"label_smoothing_factor": 0.0,
|
||||
"optim": "adamw_torch",
|
||||
"optim_args": null,
|
||||
"adafactor": false,
|
||||
"group_by_length": false,
|
||||
"length_column_name": "length",
|
||||
"report_to": [
|
||||
"tensorboard"
|
||||
],
|
||||
"ddp_find_unused_parameters": null,
|
||||
"ddp_bucket_cap_mb": null,
|
||||
"ddp_broadcast_buffers": null,
|
||||
"dataloader_pin_memory": true,
|
||||
"dataloader_persistent_workers": false,
|
||||
"skip_memory_metrics": true,
|
||||
"use_legacy_prediction_loop": false,
|
||||
"push_to_hub": false,
|
||||
"resume_from_checkpoint": null,
|
||||
"hub_model_id": null,
|
||||
"hub_strategy": "every_save",
|
||||
"hub_private_repo": null,
|
||||
"hub_always_push": false,
|
||||
"gradient_checkpointing": true,
|
||||
"gradient_checkpointing_kwargs": null,
|
||||
"include_inputs_for_metrics": false,
|
||||
"include_for_metrics": [],
|
||||
"eval_do_concat_batches": true,
|
||||
"fp16_backend": "auto",
|
||||
"evaluation_strategy": "steps",
|
||||
"push_to_hub_model_id": null,
|
||||
"push_to_hub_organization": null,
|
||||
"push_to_hub_token": null,
|
||||
"mp_parameters": "",
|
||||
"auto_find_batch_size": false,
|
||||
"full_determinism": false,
|
||||
"torchdynamo": null,
|
||||
"ray_scope": "last",
|
||||
"ddp_timeout": 1800,
|
||||
"torch_compile": false,
|
||||
"torch_compile_backend": null,
|
||||
"torch_compile_mode": null,
|
||||
"dispatch_batches": null,
|
||||
"split_batches": null,
|
||||
"include_tokens_per_second": false,
|
||||
"include_num_input_tokens_seen": false,
|
||||
"neftune_noise_alpha": null,
|
||||
"optim_target_modules": null,
|
||||
"batch_eval_metrics": false,
|
||||
"eval_on_start": false,
|
||||
"use_liger_kernel": false,
|
||||
"eval_use_gather_object": false,
|
||||
"average_tokens_across_devices": false,
|
||||
"sortish_sampler": false,
|
||||
"predict_with_generate": false,
|
||||
"generation_max_length": null,
|
||||
"generation_num_beams": null,
|
||||
"generation_config": null,
|
||||
"freeze_parameters": [],
|
||||
"freeze_parameters_ratio": 0.0,
|
||||
"trainable_parameters": [],
|
||||
"freeze_llm": false,
|
||||
"freeze_vit": true,
|
||||
"freeze_aligner": true,
|
||||
"target_modules": [
|
||||
"all-linear"
|
||||
],
|
||||
"target_regex": null,
|
||||
"modules_to_save": [],
|
||||
"lora_rank": 8,
|
||||
"lora_alpha": 32,
|
||||
"lora_dropout": 0.05,
|
||||
"lora_bias": "none",
|
||||
"lora_dtype": null,
|
||||
"lorap_lr_ratio": null,
|
||||
"use_rslora": false,
|
||||
"use_dora": false,
|
||||
"lora_ga_batch_size": 2,
|
||||
"lora_ga_iters": 2,
|
||||
"lora_ga_max_length": 1024,
|
||||
"lora_ga_direction": "ArB2r",
|
||||
"lora_ga_scale": "stable",
|
||||
"lora_ga_stable_gamma": 16,
|
||||
"init_weights": true,
|
||||
"fourier_n_frequency": 2000,
|
||||
"fourier_scaling": 300.0,
|
||||
"boft_block_size": 4,
|
||||
"boft_block_num": 0,
|
||||
"boft_n_butterfly_factor": 1,
|
||||
"boft_dropout": 0.0,
|
||||
"vera_rank": 256,
|
||||
"vera_projection_prng_key": 0,
|
||||
"vera_dropout": 0.0,
|
||||
"vera_d_initial": 0.1,
|
||||
"adapter_act": "gelu",
|
||||
"adapter_length": 128,
|
||||
"use_galore": false,
|
||||
"galore_target_modules": null,
|
||||
"galore_rank": 128,
|
||||
"galore_update_proj_gap": 50,
|
||||
"galore_scale": 1.0,
|
||||
"galore_proj_type": "std",
|
||||
"galore_optim_per_parameter": false,
|
||||
"galore_with_embedding": false,
|
||||
"galore_quantization": false,
|
||||
"galore_proj_quant": false,
|
||||
"galore_proj_bits": 4,
|
||||
"galore_proj_group_size": 256,
|
||||
"galore_cos_threshold": 0.4,
|
||||
"galore_gamma_proj": 2,
|
||||
"galore_queue_size": 5,
|
||||
"adalora_target_r": 8,
|
||||
"adalora_init_r": 12,
|
||||
"adalora_tinit": 0,
|
||||
"adalora_tfinal": 0,
|
||||
"adalora_deltaT": 1,
|
||||
"adalora_beta1": 0.85,
|
||||
"adalora_beta2": 0.85,
|
||||
"adalora_orth_reg_weight": 0.5,
|
||||
"llamapro_num_new_blocks": 4,
|
||||
"llamapro_num_groups": null,
|
||||
"lisa_activated_layers": 0,
|
||||
"lisa_step_interval": 20,
|
||||
"reft_layer_key": null,
|
||||
"reft_layers": null,
|
||||
"reft_rank": 4,
|
||||
"reft_intervention_type": "LoreftIntervention",
|
||||
"reft_args": null,
|
||||
"use_liger": false,
|
||||
"model_layer_cls_name": null,
|
||||
"metric_warmup_step": 0,
|
||||
"fsdp_num": 1,
|
||||
"acc_steps": 1,
|
||||
"add_version": true,
|
||||
"resume_only_model": false,
|
||||
"check_model": true,
|
||||
"packing": false,
|
||||
"lazy_tokenize": false,
|
||||
"loss_type": null,
|
||||
"optimizer": null,
|
||||
"metric": null,
|
||||
"acc_strategy": "token",
|
||||
"rank": -1,
|
||||
"global_world_size": 1,
|
||||
"local_world_size": 1,
|
||||
"model_suffix": "checkpoint-1237-merged",
|
||||
"model_info": "ModelInfo(model_type='llama3_2', model_dir='D:\\\\AITrain\\\\modelscope\\\\ms-swift\\\\huihui-ai\\\\checkpoint-1237-merged', torch_dtype=torch.bfloat16, max_model_len=131072, quant_method=None, quant_bits=None, config={'factor': 32.0, 'high_freq_factor': 4.0, 'low_freq_factor': 1.0, 'original_max_position_embeddings': 8192, 'rope_type': 'llama3'}, task_type=None)",
|
||||
"model_meta": "ModelMeta(model_type='llama3_2', model_groups=[ModelGroup(models=[Model(ms_model_id='LLM-Research/Llama-3.2-1B', hf_model_id='meta-llama/Llama-3.2-1B', model_path=None, ms_revision=None, hf_revision=None), Model(ms_model_id='LLM-Research/Llama-3.2-3B', hf_model_id='meta-llama/Llama-3.2-3B', model_path=None, ms_revision=None, hf_revision=None), Model(ms_model_id='LLM-Research/Llama-3.2-1B-Instruct', hf_model_id='meta-llama/Llama-3.2-1B-Instruct', model_path=None, ms_revision=None, hf_revision=None), Model(ms_model_id='LLM-Research/Llama-3.2-3B-Instruct', hf_model_id='meta-llama/Llama-3.2-3B-Instruct', model_path=None, ms_revision=None, hf_revision=None)], ignore_patterns=None, requires=None, tags=[]), ModelGroup(models=[Model(ms_model_id='LLM-Research/Llama-3.3-70B-Instruct', hf_model_id='meta-llama/Llama-3.3-70B-Instruct', model_path=None, ms_revision=None, hf_revision=None), Model(ms_model_id='unsloth/Llama-3.3-70B-Instruct-bnb-4bit', hf_model_id='unsloth/Llama-3.3-70B-Instruct-bnb-4bit', model_path=None, ms_revision=None, hf_revision=None)], ignore_patterns=None, requires=None, tags=[])], template='llama3_2', get_function=<function get_model_tokenizer_with_flash_attn at 0x000001DDB88898A0>, model_arch='llama', architectures=['LlamaForCausalLM'], is_multimodal=False, additional_saved_files=[], torch_dtype=None, ignore_patterns=[], requires=['transformers>=4.45'], tags=[])",
|
||||
"model_dir": "D:\\AITrain\\modelscope\\ms-swift\\huihui-ai\\checkpoint-1237-merged",
|
||||
"hub": "<class 'swift.hub.hub.MSHub'>",
|
||||
"training_args": "Seq2SeqTrainingArguments(output_dir='D:\\\\AITrain\\\\modelscope\\\\ms-swift\\\\output\\\\Llama-3.2-1B-Instruct-abliterated\\\\lora\\\\sft2\\\\v1-20250103-123828', overwrite_output_dir=False, do_train=False, do_eval=True, do_predict=False, eval_strategy=<IntervalStrategy.STEPS: 'steps'>, prediction_loss_only=False, per_device_train_batch_size=1, per_device_eval_batch_size=1, per_gpu_train_batch_size=None, per_gpu_eval_batch_size=None, gradient_accumulation_steps=16, eval_accumulation_steps=None, eval_delay=0, torch_empty_cache_steps=None, learning_rate=0.0001, weight_decay=0.1, adam_beta1=0.9, adam_beta2=0.999, adam_epsilon=1e-08, max_grad_norm=1.0, num_train_epochs=1.0, max_steps=-1, lr_scheduler_type=<SchedulerType.COSINE: 'cosine'>, lr_scheduler_kwargs=None, warmup_ratio=0.05, warmup_steps=0, log_level='passive', log_level_replica='warning', log_on_each_node=True, logging_dir='D:\\\\AITrain\\\\modelscope\\\\ms-swift\\\\output\\\\Llama-3.2-1B-Instruct-abliterated\\\\lora\\\\sft2\\\\v1-20250103-123828\\\\runs', logging_strategy=<IntervalStrategy.STEPS: 'steps'>, logging_first_step=True, logging_steps=5, logging_nan_inf_filter=True, save_strategy=<SaveStrategy.STEPS: 'steps'>, save_steps=50, save_total_limit=2, save_safetensors=True, save_on_each_node=False, save_only_model=False, restore_callback_states_from_checkpoint=False, no_cuda=False, use_cpu=False, use_mps_device=False, seed=42, data_seed=42, jit_mode_eval=False, use_ipex=False, bf16=True, fp16=False, fp16_opt_level='O1', half_precision_backend='auto', bf16_full_eval=False, fp16_full_eval=False, tf32=None, local_rank=0, ddp_backend=None, tpu_num_cores=None, tpu_metrics_debug=False, debug=[], dataloader_drop_last=False, eval_steps=50, dataloader_num_workers=4, dataloader_prefetch_factor=None, past_index=-1, run_name='D:\\\\AITrain\\\\modelscope\\\\ms-swift\\\\output\\\\Llama-3.2-1B-Instruct-abliterated\\\\lora\\\\sft2\\\\v1-20250103-123828', disable_tqdm=False, remove_unused_columns=False, label_names=None, load_best_model_at_end=False, metric_for_best_model='loss', greater_is_better=False, ignore_data_skip=False, fsdp=[], fsdp_min_num_params=0, fsdp_config={'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}, fsdp_transformer_layer_cls_to_wrap=None, accelerator_config=AcceleratorConfig(split_batches=False, dispatch_batches=False, even_batches=True, use_seedable_sampler=True, non_blocking=False, gradient_accumulation_kwargs=None, use_configured_state=False), deepspeed=None, label_smoothing_factor=0.0, optim=<OptimizerNames.ADAMW_TORCH: 'adamw_torch'>, optim_args=None, adafactor=False, group_by_length=False, length_column_name='length', report_to=['tensorboard'], ddp_find_unused_parameters=None, ddp_bucket_cap_mb=None, ddp_broadcast_buffers=None, dataloader_pin_memory=True, dataloader_persistent_workers=False, skip_memory_metrics=True, use_legacy_prediction_loop=False, push_to_hub=False, resume_from_checkpoint=None, hub_model_id=None, hub_strategy=<HubStrategy.EVERY_SAVE: 'every_save'>, hub_token=None, hub_private_repo=None, hub_always_push=False, gradient_checkpointing=True, gradient_checkpointing_kwargs=None, include_inputs_for_metrics=False, include_for_metrics=[], eval_do_concat_batches=True, fp16_backend='auto', evaluation_strategy='steps', push_to_hub_model_id=None, push_to_hub_organization=None, push_to_hub_token=None, mp_parameters='', auto_find_batch_size=False, full_determinism=False, torchdynamo=None, ray_scope='last', ddp_timeout=1800, torch_compile=False, torch_compile_backend=None, torch_compile_mode=None, dispatch_batches=None, split_batches=None, include_tokens_per_second=None, include_num_input_tokens_seen=None, neftune_noise_alpha=None, optim_target_modules=None, batch_eval_metrics=False, eval_on_start=False, use_liger_kernel=False, eval_use_gather_object=False, average_tokens_across_devices=None, sortish_sampler=False, predict_with_generate=False, generation_max_length=None, generation_num_beams=None, generation_config=None, acc_strategy='token', sequence_parallel_size=1, check_model=True, train_sampler_random=True, is_encoder_decoder=False, metric_warmup_step=0, train_dataset_sample=-1, fsdp_num=1, acc_steps=1, train_type='lora')"
|
||||
}
|
||||
40
config.json
Normal file
40
config.json
Normal file
@@ -0,0 +1,40 @@
|
||||
{
|
||||
"architectures": [
|
||||
"LlamaForCausalLM"
|
||||
],
|
||||
"attention_bias": false,
|
||||
"attention_dropout": 0.0,
|
||||
"bos_token_id": 128000,
|
||||
"eos_token_id": [
|
||||
128001,
|
||||
128008,
|
||||
128009
|
||||
],
|
||||
"head_dim": 64,
|
||||
"hidden_act": "silu",
|
||||
"hidden_size": 2048,
|
||||
"initializer_range": 0.02,
|
||||
"intermediate_size": 8192,
|
||||
"max_position_embeddings": 131072,
|
||||
"mlp_bias": false,
|
||||
"model_type": "llama",
|
||||
"num_attention_heads": 32,
|
||||
"num_hidden_layers": 16,
|
||||
"num_key_value_heads": 8,
|
||||
"pad_token_id": 128009,
|
||||
"pretraining_tp": 1,
|
||||
"rms_norm_eps": 1e-05,
|
||||
"rope_scaling": {
|
||||
"factor": 32.0,
|
||||
"high_freq_factor": 4.0,
|
||||
"low_freq_factor": 1.0,
|
||||
"original_max_position_embeddings": 8192,
|
||||
"rope_type": "llama3"
|
||||
},
|
||||
"rope_theta": 500000.0,
|
||||
"tie_word_embeddings": true,
|
||||
"torch_dtype": "bfloat16",
|
||||
"transformers_version": "4.47.1",
|
||||
"use_cache": true,
|
||||
"vocab_size": 128256
|
||||
}
|
||||
1
configuration.json
Normal file
1
configuration.json
Normal file
@@ -0,0 +1 @@
|
||||
{"framework": "pytorch", "task": "others", "allow_remote": true}
|
||||
12
generation_config.json
Normal file
12
generation_config.json
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"bos_token_id": 128000,
|
||||
"do_sample": true,
|
||||
"eos_token_id": [
|
||||
128001,
|
||||
128008,
|
||||
128009
|
||||
],
|
||||
"temperature": 0.6,
|
||||
"top_p": 0.9,
|
||||
"transformers_version": "4.47.1"
|
||||
}
|
||||
3
model.safetensors
Normal file
3
model.safetensors
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:f2a5cc0b53566810f97570efa8da6eb966735c4edede39d34a0301d787c7d80c
|
||||
size 2471645608
|
||||
23
special_tokens_map.json
Normal file
23
special_tokens_map.json
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"bos_token": {
|
||||
"content": "<|begin_of_text|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false
|
||||
},
|
||||
"eos_token": {
|
||||
"content": "<|eot_id|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false
|
||||
},
|
||||
"pad_token": {
|
||||
"content": "<|eot_id|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false
|
||||
}
|
||||
}
|
||||
3
tokenizer.json
Normal file
3
tokenizer.json
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:65ff5472d095ccd9332d9e723153d7bc7226cb6be9c1bffda738b5ba2e71bf26
|
||||
size 17210084
|
||||
2068
tokenizer_config.json
Normal file
2068
tokenizer_config.json
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user