初始化项目,由ModelHub XC社区提供模型

Model: Weyaxi/Einstein-7B
Source: Original Platform
This commit is contained in:
ModelHub XC
2026-07-15 11:44:06 +08:00
commit a51cae0cb5
14 changed files with 608 additions and 0 deletions

47
.gitattributes vendored Normal file
View File

@@ -0,0 +1,47 @@
*.7z filter=lfs diff=lfs merge=lfs -text
*.arrow filter=lfs diff=lfs merge=lfs -text
*.bin filter=lfs diff=lfs merge=lfs -text
*.bin.* filter=lfs diff=lfs merge=lfs -text
*.bz2 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
*.model filter=lfs diff=lfs merge=lfs -text
*.msgpack 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
*.pt filter=lfs diff=lfs merge=lfs -text
*.pth filter=lfs diff=lfs merge=lfs -text
*.rar filter=lfs diff=lfs merge=lfs -text
saved_model/**/* 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
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zstandard filter=lfs diff=lfs merge=lfs -text
*.tfevents* filter=lfs diff=lfs merge=lfs -text
*.db* filter=lfs diff=lfs merge=lfs -text
*.ark* filter=lfs diff=lfs merge=lfs -text
**/*ckpt*data* filter=lfs diff=lfs merge=lfs -text
**/*ckpt*.meta filter=lfs diff=lfs merge=lfs -text
**/*ckpt*.index filter=lfs diff=lfs merge=lfs -text
*.safetensors filter=lfs diff=lfs merge=lfs -text
*.ckpt filter=lfs diff=lfs merge=lfs -text
*.gguf* filter=lfs diff=lfs merge=lfs -text
*.ggml filter=lfs diff=lfs merge=lfs -text
*.llamafile* filter=lfs diff=lfs merge=lfs -text
*.pt2 filter=lfs diff=lfs merge=lfs -text
*.mlmodel filter=lfs diff=lfs merge=lfs -text
*.npy filter=lfs diff=lfs merge=lfs -text
*.npz filter=lfs diff=lfs merge=lfs -text
*.pickle filter=lfs diff=lfs merge=lfs -text
*.pkl filter=lfs diff=lfs merge=lfs -text
*.tar filter=lfs diff=lfs merge=lfs -text
*.wasm filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text
*tfevents* filter=lfs diff=lfs merge=lfs -text

210
README.md Normal file
View File

@@ -0,0 +1,210 @@
---
license: other
tags:
- axolotl
- generated_from_trainer
base_model: mistralai/Mistral-7B-v0.1
datasets:
- allenai/ai2_arc
- camel-ai/physics
- camel-ai/chemistry
- camel-ai/biology
- metaeval/reclor
- openbookqa
- mandyyyyii/scibench
- derek-thomas/ScienceQA
- wenhu/TheoremQA
- TIGER-Lab/ScienceEval
---
![image/jpeg](https://cdn-uploads.huggingface.co/production/uploads/6468ce47e134d050a58aa89c/uvfa4GVWrnd8SS6yBxRJZ.jpeg)
# 🔬 Einstein-7B
This model is a fine-tuned version of [mistralai/Mistral-7B-v0.1](https://huggingface.co/mistralai/Mistral-7B-v0.1) on datasets related to science.
This model is fine-tuned using [QLoRa](https://arxiv.org/abs/2305.14314) and [axolotl](https://github.com/OpenAccess-AI-Collective/axolotl).
This model's training was sponsored by [sablo.ai](https://sablo.ai).
<details><summary>See axolotl config</summary>
axolotl version: `0.3.0`
```yaml
base_model: mistralai/Mistral-7B-v0.1
model_type: MistralForCausalLM
tokenizer_type: LlamaTokenizer
is_mistral_derived_model: true
load_in_8bit: false
load_in_4bit: true
strict: false
datasets:
- path: sci-datasets/arc_challange_train_alpaca.json
ds_type: json
type: alpaca
- path: sci-datasets/camelai_biology_alpaca.json
ds_type: json
type: alpaca
- path: sci-datasets/camelai_chemistry_alpaca.json
ds_type: json
type: alpaca
- path: sci-datasets/camelai_physics_alpaca.json
ds_type: json
type: alpaca
- path: sci-datasets/openbookqa_alpaca.json
ds_type: json
type: alpaca
- path: sci-datasets/reclor_science_alpaca.json
ds_type: json
type: alpaca
- path: sci-datasets/scibench_alpaca.json
ds_type: json
type: alpaca
- path: sci-datasets/scienceqa_alpaca.json
ds_type: json
type: alpaca
- path: sci-datasets/theoremqa_alpaca.json
ds_type: json
type: alpaca
- path: sci-datasets/tiger_scienceeval_alpaca.json
ds_type: json
type: alpaca
dataset_prepared_path: last_run_prepared
val_set_size: 0
output_dir: ./science-mistral
adapter: qlora
lora_model_dir:
sequence_len: 8192
sample_packing: true
pad_to_sequence_len: true
lora_r: 128
lora_alpha: 64
lora_dropout: 0.05
lora_target_linear: true
lora_fan_in_fan_out:
lora_target_modules:
- gate_proj
- down_proj
- up_proj
- q_proj
- v_proj
- k_proj
- o_proj
wandb_project: huggingface
wandb_entity:
wandb_watch:
wandb_name:
wandb_log_model:
hub_model_id: Weyaxi/science-mistral
# change #
gradient_accumulation_steps: 12
micro_batch_size: 6
num_epochs: 2
optimizer: adamw_bnb_8bit
lr_scheduler: cosine
learning_rate: 0.0002
# change #
train_on_inputs: false
group_by_length: false
bf16: true
fp16: false
tf32: false
gradient_checkpointing: true
early_stopping_patience:
resume_from_checkpoint:
local_rank:
logging_steps: 1
xformers_attention:
flash_attention: true
warmup_steps: 10
saves_per_epoch: 3
debug:
deepspeed:
weight_decay: 0.1
fsdp:
fsdp_config:
special_tokens:
bos_token: "<s>"
eos_token: "</s>"
unk_token: "<unk>"
```
</details><br>
# 📊 Datasets
Following datasets were used in this model:
- [ARC](https://huggingface.co/datasets/allenai/ai2_arc) (Note: Only **train** part)
- [camel-ai/physics](https://huggingface.co/datasets/camel-ai/physics)
- [camel-ai/chemistry](https://huggingface.co/datasets/camel-ai/chemistry)
- [camel-ai/biology](https://huggingface.co/datasets/camel-ai/biology)
- [openbookqa](https://huggingface.co/datasets/openbookqa)
- [reclor](https://huggingface.co/datasets/metaeval/reclor)
- [scibench](https://github.com/mandyyyyii/scibench)
- [ScienceQA](https://huggingface.co/datasets/derek-thomas/ScienceQA)
- [TheoremQA](https://huggingface.co/datasets/wenhu/TheoremQA)
- [ScienceEval](https://huggingface.co/datasets/TIGER-Lab/ScienceEval)
# 💬 Prompt Template
You can use this prompt template while using the model:
### Alpaca
```
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
{instruction}
### Input:
{input}
### Response:
```
# 🤝 Acknowledgments
Thanks to Platypus for providing scripts to convert some of the datasets to Alpaca format: [Platypus/data_pipeline](https://github.com/arielnlee/Platypus/tree/main/data_pipeline)
Thanks to all the dataset authors mentioned in the datasets section.
Thanks to [axolotl](https://github.com/OpenAccess-AI-Collective/axolotl) for making the repository I used to make this model.
[<img src="https://raw.githubusercontent.com/OpenAccess-AI-Collective/axolotl/main/image/axolotl-badge-web.png" alt="Built with Axolotl" width="200" height="32"/>](https://github.com/OpenAccess-AI-Collective/axolotl)
If you would like to support me:
[☕ Buy Me a Coffee](https://www.buymeacoffee.com/weyaxi)

26
config.json Normal file
View File

@@ -0,0 +1,26 @@
{
"_name_or_path": "mistralai/Mistral-7B-v0.1",
"architectures": [
"MistralForCausalLM"
],
"attention_dropout": 0.0,
"bos_token_id": 1,
"eos_token_id": 2,
"hidden_act": "silu",
"hidden_size": 4096,
"initializer_range": 0.02,
"intermediate_size": 14336,
"max_position_embeddings": 32768,
"model_type": "mistral",
"num_attention_heads": 32,
"num_hidden_layers": 32,
"num_key_value_heads": 8,
"rms_norm_eps": 1e-05,
"rope_theta": 10000.0,
"sliding_window": 4096,
"tie_word_embeddings": false,
"torch_dtype": "bfloat16",
"transformers_version": "4.37.0",
"use_cache": false,
"vocab_size": 32000
}

117
configs/science_config.yml Normal file
View File

@@ -0,0 +1,117 @@
base_model: mistralai/Mistral-7B-v0.1
model_type: MistralForCausalLM
tokenizer_type: LlamaTokenizer
is_mistral_derived_model: true
load_in_8bit: true
load_in_4bit: false
strict: false
datasets:
- path: sci-datasets/arc_challange_train_alpaca.json
ds_type: json
type: alpaca
- path: sci-datasets/camelai_biology_alpaca.json
ds_type: json
type: alpaca
- path: sci-datasets/camelai_chemistry_alpaca.json
ds_type: json
type: alpaca
- path: sci-datasets/camelai_physics_alpaca.json
ds_type: json
type: alpaca
- path: sci-datasets/openbookqa_alpaca.json
ds_type: json
type: alpaca
- path: sci-datasets/reclor_science_alpaca.json
ds_type: json
type: alpaca
- path: sci-datasets/scibench_alpaca.json
ds_type: json
type: alpaca
- path: sci-datasets/scienceqa_alpaca.json
ds_type: json
type: alpaca
- path: sci-datasets/theoremqa_alpaca.json
ds_type: json
type: alpaca
- path: sci-datasets/tiger_scienceeval_alpaca.json
ds_type: json
type: alpaca
dataset_prepared_path: last_run_prepared
val_set_size: 0
output_dir: ./science-mistral
adapter: lora
lora_model_dir:
sequence_len: 8192
sample_packing: true
pad_to_sequence_len: true
lora_r: 64
lora_alpha: 32
lora_dropout: 0.05
lora_target_linear: true
lora_fan_in_fan_out:
lora_target_modules:
- gate_proj
- down_proj
- up_proj
- q_proj
- v_proj
- k_proj
- o_proj
wandb_project: huggingface
wandb_entity:
wandb_watch:
wandb_name:
wandb_log_model:
# change #
gradient_accumulation_steps: 4
micro_batch_size: 4
num_epochs: 1
optimizer: adamw_bnb_8bit
lr_scheduler: cosine
learning_rate: 0.0002
# change #
train_on_inputs: false
group_by_length: false
bf16: true
fp16: false
tf32: false
gradient_checkpointing: true
early_stopping_patience:
resume_from_checkpoint:
local_rank:
logging_steps: 1
xformers_attention:
flash_attention: true
warmup_steps: 10
saves_per_epoch: 2
debug:
deepspeed:
weight_decay: 0.1
fsdp:
fsdp_config:
special_tokens:
bos_token: "<s>"
eos_token: "</s>"
unk_token: "<unk>"

View File

@@ -0,0 +1,118 @@
base_model: mistralai/Mistral-7B-v0.1
model_type: MistralForCausalLM
tokenizer_type: LlamaTokenizer
is_mistral_derived_model: true
load_in_8bit: false
load_in_4bit: true
strict: false
datasets:
- path: sci-datasets/arc_challange_train_alpaca.json
ds_type: json
type: alpaca
- path: sci-datasets/camelai_biology_alpaca.json
ds_type: json
type: alpaca
- path: sci-datasets/camelai_chemistry_alpaca.json
ds_type: json
type: alpaca
- path: sci-datasets/camelai_physics_alpaca.json
ds_type: json
type: alpaca
- path: sci-datasets/openbookqa_alpaca.json
ds_type: json
type: alpaca
- path: sci-datasets/reclor_science_alpaca.json
ds_type: json
type: alpaca
- path: sci-datasets/scibench_alpaca.json
ds_type: json
type: alpaca
- path: sci-datasets/scienceqa_alpaca.json
ds_type: json
type: alpaca
- path: sci-datasets/theoremqa_alpaca.json
ds_type: json
type: alpaca
- path: sci-datasets/tiger_scienceeval_alpaca.json
ds_type: json
type: alpaca
dataset_prepared_path: last_run_prepared
val_set_size: 0
output_dir: ./science-mistral
adapter: qlora
lora_model_dir:
sequence_len: 8192
sample_packing: true
pad_to_sequence_len: true
lora_r: 128
lora_alpha: 64
lora_dropout: 0.05
lora_target_linear: true
lora_fan_in_fan_out:
lora_target_modules:
- gate_proj
- down_proj
- up_proj
- q_proj
- v_proj
- k_proj
- o_proj
wandb_project: huggingface
wandb_entity:
wandb_watch:
wandb_name:
wandb_log_model:
hub_model_id: Weyaxi/science-mistral
# change #
gradient_accumulation_steps: 12
micro_batch_size: 6
num_epochs: 2
optimizer: adamw_bnb_8bit
lr_scheduler: cosine
learning_rate: 0.0002
# change #
train_on_inputs: false
group_by_length: false
bf16: true
fp16: false
tf32: false
gradient_checkpointing: true
early_stopping_patience:
resume_from_checkpoint:
local_rank:
logging_steps: 1
xformers_attention:
flash_attention: true
warmup_steps: 10
saves_per_epoch: 3
debug:
deepspeed:
weight_decay: 0.1
fsdp:
fsdp_config:
special_tokens:
bos_token: "<s>"
eos_token: "</s>"
unk_token: "<unk>"

1
configuration.json Normal file
View File

@@ -0,0 +1 @@
{"framework": "pytorch", "task": "text-generation", "allow_remote": true}

6
generation_config.json Normal file
View File

@@ -0,0 +1,6 @@
{
"_from_model_config": true,
"bos_token_id": 1,
"eos_token_id": 2,
"transformers_version": "4.37.0"
}

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:be8a9d53c2b48341880a123c127451ae4bd9964707068e90c2e385c55a627eeb
size 4943185145

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c6db7d2228e6fca89ae223480ca84c361c85fbdf76c18e2e643157f38233c5ae
size 4999844257

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:fa93cebe7dad77e365ac3062f04879b9c70aa0a1a84c5798688805b2c07b012b
size 4540536863

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5fc5f5d86e6a6cea0356e34224ce999c5c3c955a1717ef450579fd161ac8d103
size 23950

24
special_tokens_map.json Normal file
View File

@@ -0,0 +1,24 @@
{
"bos_token": {
"content": "<s>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false
},
"eos_token": {
"content": "</s>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false
},
"pad_token": "</s>",
"unk_token": {
"content": "<unk>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false
}
}

BIN
tokenizer.model (Stored with Git LFS) Normal file

Binary file not shown.

44
tokenizer_config.json Normal file
View File

@@ -0,0 +1,44 @@
{
"add_bos_token": true,
"add_eos_token": false,
"added_tokens_decoder": {
"0": {
"content": "<unk>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"1": {
"content": "<s>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"2": {
"content": "</s>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
}
},
"additional_special_tokens": [],
"bos_token": "<s>",
"clean_up_tokenization_spaces": false,
"eos_token": "</s>",
"legacy": true,
"model_max_length": 1000000000000000019884624838656,
"pad_token": "</s>",
"sp_model_kwargs": {},
"spaces_between_special_tokens": false,
"tokenizer_class": "LlamaTokenizer",
"trust_remote_code": false,
"unk_token": "<unk>",
"use_default_system_prompt": false,
"use_fast": true
}