Upload folder using ModelScope SDK

This commit is contained in:
Cherrytest
2025-08-25 18:31:20 +00:00
parent edc927ed79
commit 987e5ef4b4
13 changed files with 594 additions and 42 deletions

146
README.md
View File

@@ -1,47 +1,111 @@
---
license: Apache License 2.0
#model-type:
##如 gpt、phi、llama、chatglm、baichuan 等
#- gpt
#domain:
##如 nlp、cv、audio、multi-modal
#- nlp
#language:
##语言代码列表 https://help.aliyun.com/document_detail/215387.html?spm=a2c4g.11186623.0.0.9f8d7467kni6Aa
#- cn
#metrics:
##如 CIDEr、Blue、ROUGE 等
#- CIDEr
#tags:
##各种自定义,包括 pretrained、fine-tuned、instruction-tuned、RL-tuned 等训练方法和其他
#- pretrained
#tools:
##如 vllm、fastchat、llamacpp、AdaSeq 等
#- vllm
license: apache-2.0
base_model:
- Qwen/Qwen3-1.7B
datasets:
- prithivMLmods/Demeter-LongCoT-400K
language:
- en
pipeline_tag: text-generation
library_name: transformers
tags:
- text-generation-inference
- LongCoT
- moe
- trl
- math
- code
- stem
---
### 当前模型的贡献者未提供更加详细的模型介绍。模型文件和权重,可浏览“模型文件”页面获取。
#### 您可以通过如下git clone命令或者ModelScope SDK来下载模型
SDK下载
```bash
#安装ModelScope
pip install modelscope
```
![1.png](https://cdn-uploads.huggingface.co/production/uploads/65bb837dbfb878f46c77de4c/YL9ww0vwTra8q-9b8wGqd.png)
# **Demeter-LongCoT-Qwen3-1.7B**
> **Demeter-LongCoT-Qwen3-1.7B** is a reasoning-focused model fine-tuned on **Qwen/Qwen3-1.7B** using the **Demeter-LongCoT-400K** dataset.
> It is designed for **math and code chain-of-thought reasoning**, blending symbolic precision, scientific logic, and structured output fluency—making it an effective tool for developers, educators, and researchers seeking reliable step-by-step reasoning.
> \[!note]
> GGUF: [https://huggingface.co/prithivMLmods/Demeter-LongCoT-Qwen3-1.7B-GGUF](https://huggingface.co/prithivMLmods/Demeter-LongCoT-Qwen3-1.7B-GGUF)
---
## **Key Features**
1. **Unified Reasoning in Math & Code**
Fine-tuned on **Demeter-LongCoT-400K**, which emphasizes extended chain-of-thought reasoning in mathematics, algorithms, and programming workflows.
2. **Advanced Code Understanding & Generation**
Handles multi-language programming tasks with explanations, optimization hints, and error detection—suited for algorithm synthesis, debugging, and prototyping.
3. **Mathematical Problem Solving**
Excels at step-by-step derivations, symbolic manipulations, and applied problem solving across calculus, algebra, and logic-based reasoning.
4. **Chain-of-Thought Focused Reasoning**
Optimized to produce clear, structured thought processes for both **STEM explanations** and **computational logic** tasks.
5. **Structured Output Mastery**
Generates well-formed outputs in **LaTeX**, **Markdown**, **JSON**, **CSV**, and **YAML**, enabling smooth integration with research pipelines and technical documentation.
6. **Balanced Performance for Deployment**
Designed to deliver strong reasoning under moderate compute budgets, deployable on **mid-range GPUs**, **offline clusters**, and **specialized edge AI systems**.
---
## **Quickstart with Transformers**
```python
#SDK模型下载
from modelscope import snapshot_download
model_dir = snapshot_download('prithivMLmods/Demeter-LongCoT-Qwen3-1.7B')
```
Git下载
```
#Git模型下载
git clone https://www.modelscope.cn/prithivMLmods/Demeter-LongCoT-Qwen3-1.7B.git
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "prithivMLmods/Demeter-LongCoT-Qwen3-1.7B"
model = AutoModelForCausalLM.from_pretrained(
model_name,
torch_dtype="auto",
device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained(model_name)
prompt = "Solve the integral of x^2 * e^x step by step."
messages = [
{"role": "system", "content": "You are a tutor skilled in math, code, and step-by-step reasoning."},
{"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]
print(response)
```
<p style="color: lightgrey;">如果您是本模型的贡献者,我们邀请您根据<a href="https://modelscope.cn/docs/ModelScope%E6%A8%A1%E5%9E%8B%E6%8E%A5%E5%85%A5%E6%B5%81%E7%A8%8B%E6%A6%82%E8%A7%88" style="color: lightgrey; text-decoration: underline;">模型贡献文档</a>,及时完善模型卡片内容。</p>
---
## **Intended Use**
* Step-by-step math tutoring and symbolic derivation
* Advanced coding assistant for algorithms, debugging, and structured reasoning
* Chain-of-thought generation for research and education tools
* Producing structured outputs for technical documentation and computational pipelines
* Deployments requiring reliable reasoning under constrained compute
## **Limitations**
* Not tuned for general-purpose or conversational tasks
* May underperform in long-form multi-document contexts
* Specialized in math and code—general writing or casual dialogue may be weak
* Prioritizes structured reasoning over natural or emotional tone generation