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

Model: prithivMLmods/Eratosthenes-Polymath-14B-Instruct
Source: Original Platform
This commit is contained in:
ModelHub XC
2026-08-30 20:53:12 +08:00
commit f4d0d6797e
14 changed files with 271 additions and 0 deletions

54
.gitattributes vendored Normal file
View File

@@ -0,0 +1,54 @@
*.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
tokenizer.json filter=lfs diff=lfs merge=lfs -text
model-00001-of-00006.safetensors filter=lfs diff=lfs merge=lfs -text
model-00002-of-00006.safetensors filter=lfs diff=lfs merge=lfs -text
model-00003-of-00006.safetensors filter=lfs diff=lfs merge=lfs -text
model-00004-of-00006.safetensors filter=lfs diff=lfs merge=lfs -text
model-00005-of-00006.safetensors filter=lfs diff=lfs merge=lfs -text
model-00006-of-00006.safetensors filter=lfs diff=lfs merge=lfs -text

122
README.md Normal file
View File

@@ -0,0 +1,122 @@
---
license: apache-2.0
language:
- en
base_model:
- Qwen/Qwen2.5-14B-Instruct
pipeline_tag: text-generation
library_name: transformers
tags:
- text-generation-inference
- coder
- Math
- RL
---
![8.png](https://cdn-uploads.huggingface.co/production/uploads/65bb837dbfb878f46c77de4c/HXno2Of6OWRexX88f2wtL.png)
# **Eratosthenes-Polymath-14B-Instruct**
> **Eratosthenes-Polymath-14B-Instruct** is built on the Qwen 2.5 14B modality architecture, engineered to excel in mathematical reasoning, distributed reinforcement learning (RL), and general-purpose problem solving. This model is fine-tuned with chain-of-thought reasoning datasets, optimization-focused corpora, and advanced structured reasoning datasets to maximize its capabilities in logical deduction, multi-step reasoning, and intelligent decision-making.
## **Key Improvements**
1. **Advanced Mathematical Reasoning**:
Excels in solving complex equations, performing symbolic computation, theorem proving, and step-by-step mathematical problem-solving.
2. **Distributed Reinforcement Learning Expertise**:
Specially fine-tuned for robust policy optimization using distributed RL techniques, providing resilience and optimality across dynamic problem spaces.
3. **General-Purpose Reasoning and Problem Solving**:
Strong across a broad range of domains, handling factual questions, logical analysis, and multi-step cognitive tasks.
4. **Long-Context Mastery**:
Supports up to 128K tokens for context and can generate up to 8K tokens, enabling detailed, coherent long-form outputs and complex derivations.
5. **Superior Instruction Following**:
Capable of following complex and structured prompts precisely, maintaining focus and clarity over extended dialogues.
6. **Coding and Algorithmic Fluency**:
Highly effective in code generation, debugging, algorithm design, and optimization problem modeling across various programming languages.
## **Quickstart with transformers**
Use the model easily with the `transformers` library and `apply_chat_template`:
```python
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "prithivMLmods/Eratosthenes-Polymath-14B-Instruct"
model = AutoModelForCausalLM.from_pretrained(
model_name,
torch_dtype="auto",
device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained(model_name)
prompt = "Explain the connection between distributed reinforcement learning and robust policy optimization."
messages = [
{"role": "system", "content": "You are an expert assistant specializing in mathematics, optimization, and reinforcement learning."},
{"role": "user", "content": prompt}
]
text = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True
)
model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
generated_ids = model.generate(
**model_inputs,
max_new_tokens=512
)
generated_ids = [
output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
]
response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
```
## **Intended Use**
1. **Mathematical and Optimization Problem Solving**:
Designed for solving complex mathematical problems, optimization modeling, symbolic logic, and structured derivations.
2. **Distributed Reinforcement Learning Research**:
Supports designing, analyzing, and explaining distributed RL systems, robust policy optimization, and autonomous decision systems.
3. **General Knowledge and Reasoning**:
Effective in answering a wide range of questions and performing structured reasoning across scientific, technical, and educational domains.
4. **Educational and Research Support**:
Ideal for students, researchers, and professionals seeking detailed explanations, derivations, and robust scientific insights.
5. **Code Writing and Algorithm Design**:
Excels at creating, optimizing, and explaining algorithms, particularly those relevant to mathematical computation and optimization.
6. **Intelligent Conversational Systems**:
Perfect for technical conversational agents and educational bots requiring deep understanding and detailed reasoning capabilities.
7. **Long-Form Technical Content Generation**:
Capable of producing structured, coherent articles, tutorials, and research papers, especially in technical and mathematical fields.
8. **Structured Data Generation**:
Supports outputting structured formats such as proofs, equations, tables, and JSON useful for scientific and technical workflows.
## **Limitations**
1. **Heavy Hardware Requirements**:
Due to its large parameter count and long-context handling, it requires powerful GPUs or TPUs with significant memory.
2. **Potential for Training Biases**:
Outputs may still reflect biases from the mathematical, technical, or optimization-specific datasets used during training.
3. **Less Effective in Creative Tasks**:
Focused more on technical and logical reasoning than on freeform creative writing or storytelling.
4. **No Real-Time Event Awareness**:
Limited to knowledge prior to its training cutoff, without access to live or real-world updates.
5. **Prompt Sensitivity**:
Performance may vary based on the clarity, structure, and specificity of the prompt, particularly for complex multi-step tasks.
6. **Error Propagation Risk**:
Small inaccuracies in early stages of long-form outputs could propagate, affecting the overall answer coherence.

28
config.json Normal file
View File

@@ -0,0 +1,28 @@
{
"architectures": [
"Qwen2ForCausalLM"
],
"attention_dropout": 0.0,
"bos_token_id": 151643,
"eos_token_id": 151643,
"hidden_act": "silu",
"hidden_size": 5120,
"initializer_range": 0.02,
"intermediate_size": 13824,
"max_position_embeddings": 131072,
"max_window_layers": 48,
"model_type": "qwen2",
"num_attention_heads": 40,
"num_hidden_layers": 48,
"num_key_value_heads": 8,
"rms_norm_eps": 1e-05,
"rope_scaling": null,
"rope_theta": 1000000.0,
"sliding_window": 131072,
"tie_word_embeddings": false,
"torch_dtype": "bfloat16",
"transformers_version": "4.51.3",
"use_cache": true,
"use_sliding_window": false,
"vocab_size": 152064
}

1
configuration.json Normal file
View File

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

9
generation_config.json Normal file
View File

@@ -0,0 +1,9 @@
{
"_from_model_config": true,
"bos_token_id": 151646,
"eos_token_id": 151643,
"do_sample": true,
"temperature": 0.6,
"top_p": 0.95,
"transformers_version": "4.51.3"
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

File diff suppressed because one or more lines are too long

3
tokenizer.json Normal file
View File

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

35
tokenizer_config.json Normal file
View File

@@ -0,0 +1,35 @@
{
"add_bos_token": true,
"add_eos_token": false,
"bos_token": {
"__type": "AddedToken",
"content": "<begin▁of▁sentence>",
"lstrip": false,
"normalized": true,
"rstrip": false,
"single_word": false
},
"clean_up_tokenization_spaces": false,
"eos_token": {
"__type": "AddedToken",
"content": "<end▁of▁sentence>",
"lstrip": false,
"normalized": true,
"rstrip": false,
"single_word": false
},
"legacy": true,
"model_max_length": 16384,
"pad_token": {
"__type": "AddedToken",
"content": "<end▁of▁sentence>",
"lstrip": false,
"normalized": true,
"rstrip": false,
"single_word": false
},
"sp_model_kwargs": {},
"unk_token": null,
"tokenizer_class": "LlamaTokenizerFast",
"chat_template": "{% if not add_generation_prompt is defined %}{% set add_generation_prompt = false %}{% endif %}{% set ns = namespace(is_first=false, is_tool=false, is_output_first=true, system_prompt='') %}{%- for message in messages %}{%- if message['role'] == 'system' %}{% set ns.system_prompt = message['content'] %}{%- endif %}{%- endfor %}{{bos_token}}{{ns.system_prompt}}{%- for message in messages %}{%- if message['role'] == 'user' %}{%- set ns.is_tool = false -%}{{'<User>' + message['content']}}{%- endif %}{%- if message['role'] == 'assistant' and message['content'] is none %}{%- set ns.is_tool = false -%}{%- for tool in message['tool_calls']%}{%- if not ns.is_first %}{{'<Assistant><tool▁calls▁begin><tool▁call▁begin>' + tool['type'] + '<tool▁sep>' + tool['function']['name'] + '\\n' + '```json' + '\\n' + tool['function']['arguments'] + '\\n' + '```' + '<tool▁call▁end>'}}{%- set ns.is_first = true -%}{%- else %}{{'\\n' + '<tool▁call▁begin>' + tool['type'] + '<tool▁sep>' + tool['function']['name'] + '\\n' + '```json' + '\\n' + tool['function']['arguments'] + '\\n' + '```' + '<tool▁call▁end>'}}{{'<tool▁calls▁end><end▁of▁sentence>'}}{%- endif %}{%- endfor %}{%- endif %}{%- if message['role'] == 'assistant' and message['content'] is not none %}{%- if ns.is_tool %}{{'<tool▁outputs▁end>' + message['content'] + '<end▁of▁sentence>'}}{%- set ns.is_tool = false -%}{%- else %}{% set content = message['content'] %}{% if '</think>' in content %}{% set content = content.split('</think>')[-1] %}{% endif %}{{'<Assistant>' + content + '<end▁of▁sentence>'}}{%- endif %}{%- endif %}{%- if message['role'] == 'tool' %}{%- set ns.is_tool = true -%}{%- if ns.is_output_first %}{{'<tool▁outputs▁begin><tool▁output▁begin>' + message['content'] + '<tool▁output▁end>'}}{%- set ns.is_output_first = false %}{%- else %}{{'\\n<tool▁output▁begin>' + message['content'] + '<tool▁output▁end>'}}{%- endif %}{%- endif %}{%- endfor -%}{% if ns.is_tool %}{{'<tool▁outputs▁end>'}}{% endif %}{% if add_generation_prompt and not ns.is_tool %}{{'<Assistant><think>\\n'}}{% endif %}"
}