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

Model: Heralax/philosophy-mistral
Source: Original Platform
This commit is contained in:
ModelHub XC
2026-07-04 11:56:17 +08:00
commit e184d57748
12 changed files with 91329 additions and 0 deletions

2
.gitattributes vendored Normal file
View File

@@ -0,0 +1,2 @@
*.gguf filter=lfs diff=lfs merge=lfs -text
*.bin filter=lfs diff=lfs merge=lfs -text

View File

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

68
README.md Normal file
View File

@@ -0,0 +1,68 @@
---
library_name: transformers
license: apache-2.0
base_model: Heralax/philosophy-llm-mistral-pretrain
tags:
- generated_from_trainer
model-index:
- name: philosophy-hardcore-pretraining
results: []
---
# Philosophy LLM
I would've trained this on Phi so I could've called it Phi-losophy if I had thought of that joke before kicking off the run. Oh well.
It's trained on Mistral instead. That's a Mist opportunity right there.
This is a narrow domain-expert LLM trained on the top 5 books on Gutenberg:
- The Problems of Philosophy (Bertrand Russell)
- Beyond Good and Evil (Nietzsche)
- Thus Spake Zarathustra: A Book for All and None (Nietzsche)
- The Prince (Machiavelli)
- Second Treatise of Government
It's meant to be an interesting novelty, showing off training on a specific domain. It has some quirks. Namely:
1. It seems to have memorized the training data very well. Ask a question that exists in the training data, with temp 0, and it will usually give you back the exact response word-for-word. This means that, on the subjects covered by its data, it will be very knowledgeable.
2. I forgot to include any generalist instruct data, so it's... not stupid, at least not particularly stupid by 7b standards, but it is very much limited to QA.
3. It's much less fluffy and wasteful with its responses than previous Augmentoolkit domain expert models, due to using a new dataset setting. This tends to make it respond with less detail, but it also may remember stuff better and get to the point easier.
Some example chats (blame LM studio for not hiding the stop token):
Asking stuff from the training data:
![image/png](https://cdn-uploads.huggingface.co/production/uploads/64825ebceb4befee377cf8ac/AirHFo61iB1HAP-IXwnZn.png)
Asking a question directly from the training data and one I came up with on the spot.
![image/png](https://cdn-uploads.huggingface.co/production/uploads/64825ebceb4befee377cf8ac/Ccm-EeDyOFcylCefwDS-W.png)
Some things that are kinda funny but also show off the drawback of not using any generalist data:
![image/png](https://cdn-uploads.huggingface.co/production/uploads/64825ebceb4befee377cf8ac/e2sCBLIX8Xg91KSevGt_B.png))
![image/png](https://cdn-uploads.huggingface.co/production/uploads/64825ebceb4befee377cf8ac/P0bhWyENxOaxPvC4fE6jw.png)
## Training procedure
### Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 2e-05
- train_batch_size: 2
- eval_batch_size: 1
- seed: 42
- distributed_type: multi-GPU
- num_devices: 6
- gradient_accumulation_steps: 6
- total_train_batch_size: 72
- total_eval_batch_size: 6
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: cosine
- lr_scheduler_warmup_steps: 136
- num_epochs: 6
### Framework versions
- Transformers 4.45.0.dev0
- Pytorch 2.3.1+cu121
- Datasets 2.21.0
- Tokenizers 0.19.1

3
added_tokens.json Normal file
View File

@@ -0,0 +1,3 @@
{
"<|end_of_text|>": 32000
}

27
config.json Normal file
View File

@@ -0,0 +1,27 @@
{
"_name_or_path": "Heralax/philosophy-llm-mistral-pretrain",
"architectures": [
"MistralForCausalLM"
],
"attention_dropout": 0.0,
"bos_token_id": 1,
"eos_token_id": 2,
"head_dim": 128,
"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": 1000000.0,
"sliding_window": null,
"tie_word_embeddings": false,
"torch_dtype": "bfloat16",
"transformers_version": "4.45.0.dev0",
"use_cache": false,
"vocab_size": 32001
}

7
generation_config.json Normal file
View File

@@ -0,0 +1,7 @@
{
"_from_model_config": true,
"bos_token_id": 1,
"do_sample": true,
"eos_token_id": 2,
"transformers_version": "4.45.0.dev0"
}

3
ggml-model-Q8_0.gguf Normal file
View File

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

3
pytorch_model.bin Normal file
View File

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

30
special_tokens_map.json Normal file
View File

@@ -0,0 +1,30 @@
{
"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": {
"content": "<|end_of_text|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false
},
"unk_token": {
"content": "<unk>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false
}
}

91132
tokenizer.json Normal file

File diff suppressed because it is too large Load Diff

BIN
tokenizer.model Normal file

Binary file not shown.

51
tokenizer_config.json Normal file
View File

@@ -0,0 +1,51 @@
{
"add_bos_token": true,
"add_eos_token": false,
"add_prefix_space": true,
"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
},
"32000": {
"content": "<|end_of_text|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
}
},
"bos_token": "<s>",
"chat_template": "{% if not add_generation_prompt is defined %}{% set add_generation_prompt = false %}{% endif %}{% for message in messages %}{{'<|im_start|>' + message['role'] + '\n' + message['content'] + '<|im_end|>' + '\n'}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant\n' }}{% endif %}",
"clean_up_tokenization_spaces": false,
"eos_token": "</s>",
"legacy": true,
"model_max_length": 1000000000000000019884624838656,
"pad_token": "<|end_of_text|>",
"sp_model_kwargs": {},
"spaces_between_special_tokens": false,
"tokenizer_class": "LlamaTokenizer",
"unk_token": "<unk>",
"use_default_system_prompt": false
}