Official Release: Optimized & Sanitized
Browse files- README.md +38 -53
- config.json +2 -13
- model.safetensors +2 -2
README.md
CHANGED
|
@@ -4,95 +4,80 @@ language:
|
|
| 4 |
- en
|
| 5 |
pipeline_tag: text-generation
|
| 6 |
tags:
|
|
|
|
| 7 |
- reasoning
|
| 8 |
-
-
|
|
|
|
| 9 |
- enterprise
|
| 10 |
-
-
|
|
|
|
| 11 |
---
|
| 12 |
|
| 13 |
# DeepBrainz-R1-2B-16K
|
| 14 |
|
| 15 |
-
**DeepBrainz-R1-2B-16K** is a compact,
|
| 16 |
-
DeepBrainz-R series, designed for structured problem-solving, analysis,
|
| 17 |
-
and enterprise research workflows.
|
| 18 |
|
| 19 |
-
|
| 20 |
-
and **stable behavior over long contexts**, while remaining highly
|
| 21 |
-
cost-efficient to deploy.
|
| 22 |
|
| 23 |
---
|
| 24 |
|
| 25 |
-
## Model Highlights
|
| 26 |
|
| 27 |
-
- **
|
| 28 |
-
- **
|
| 29 |
-
-
|
| 30 |
-
-
|
| 31 |
-
- **
|
| 32 |
|
| 33 |
---
|
| 34 |
|
| 35 |
-
## Intended Use
|
| 36 |
|
| 37 |
-
-
|
| 38 |
-
- Math and
|
| 39 |
-
-
|
| 40 |
-
-
|
| 41 |
-
- Inference-time scaling and test-time compute experiments
|
| 42 |
|
| 43 |
-
|
| 44 |
|
| 45 |
---
|
| 46 |
|
| 47 |
-
## Usage
|
| 48 |
|
| 49 |
```python
|
| 50 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 51 |
|
| 52 |
model_id = "DeepBrainz/DeepBrainz-R1-2B-16K"
|
| 53 |
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
out = mdl.generate(
|
| 61 |
-
**inputs,
|
| 62 |
-
max_new_tokens=256,
|
| 63 |
-
do_sample=True,
|
| 64 |
-
temperature=0.6,
|
| 65 |
-
top_p=0.95,
|
| 66 |
)
|
| 67 |
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
---
|
| 72 |
-
|
| 73 |
-
## Training Summary
|
| 74 |
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
abstracted in this public release.
|
| 79 |
|
| 80 |
---
|
| 81 |
|
| 82 |
-
## Limitations
|
| 83 |
|
| 84 |
-
|
| 85 |
-
Larger models may outperform R1-2B-16K on extremely complex tasks.
|
| 86 |
|
| 87 |
---
|
| 88 |
|
| 89 |
-
## License
|
| 90 |
|
| 91 |
-
Apache 2.0
|
| 92 |
|
| 93 |
---
|
| 94 |
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
|
|
|
| 4 |
- en
|
| 5 |
pipeline_tag: text-generation
|
| 6 |
tags:
|
| 7 |
+
- deepbrainz
|
| 8 |
- reasoning
|
| 9 |
+
- mathematics
|
| 10 |
+
- code
|
| 11 |
- enterprise
|
| 12 |
+
- 2b
|
| 13 |
+
library_name: transformers
|
| 14 |
---
|
| 15 |
|
| 16 |
# DeepBrainz-R1-2B-16K
|
| 17 |
|
| 18 |
+
**DeepBrainz-R1-2B-16K** is a compact, high-performance reasoning model engineered by **DeepBrainz AI & Labs**. Designed for efficiency and scalability, it specializes in structured chain-of-thought reasoning, mathematical problem solving, and logical analysis.
|
|
|
|
|
|
|
| 19 |
|
| 20 |
+
This model is part of the **DeepBrainz-R1 Series**, built to deliver frontier-class reasoning capabilities in cost-effective parameter sizes.
|
|
|
|
|
|
|
| 21 |
|
| 22 |
---
|
| 23 |
|
| 24 |
+
## 🚀 Model Highlights
|
| 25 |
|
| 26 |
+
- **Parameter Count:** ~2B
|
| 27 |
+
- **Context Window:** 16,384 tokens
|
| 28 |
+
- **Specialization:** STEM Reasoning, Logic, Code Analysis
|
| 29 |
+
- **Architecture:** Optimized Dense Transformer (Qwen2.5/3 Compatible)
|
| 30 |
+
- **Deployment:** Ready for vLLM, TGI, and local inference
|
| 31 |
|
| 32 |
---
|
| 33 |
|
| 34 |
+
## 🎯 Intended Use Cases
|
| 35 |
|
| 36 |
+
- **Agentic Workflows:** Reliability in multi-step planning tasks.
|
| 37 |
+
- **Math & Science:** Solving complex word problems and equations.
|
| 38 |
+
- **Code Generation:** Writing and debugging algorithms.
|
| 39 |
+
- **Structured Data Extraction:** Parsing and reasoning over unstructured text.
|
|
|
|
| 40 |
|
| 41 |
+
> **Note:** This is a base reasoning model. For conversational chat, we recommend using a specific instruct template or fine-tuning on your domain data.
|
| 42 |
|
| 43 |
---
|
| 44 |
|
| 45 |
+
## 💻 Usage
|
| 46 |
|
| 47 |
```python
|
| 48 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 49 |
|
| 50 |
model_id = "DeepBrainz/DeepBrainz-R1-2B-16K"
|
| 51 |
|
| 52 |
+
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
| 53 |
+
model = AutoModelForCausalLM.from_pretrained(
|
| 54 |
+
model_id,
|
| 55 |
+
torch_dtype="bfloat16",
|
| 56 |
+
device_map="auto"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 57 |
)
|
| 58 |
|
| 59 |
+
prompt = "Analyze the time complexity of the following algorithm:"
|
| 60 |
+
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 61 |
|
| 62 |
+
outputs = model.generate(**inputs, max_new_tokens=256)
|
| 63 |
+
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
|
| 64 |
+
```
|
|
|
|
| 65 |
|
| 66 |
---
|
| 67 |
|
| 68 |
+
## 🛡️ Limitations & Safety
|
| 69 |
|
| 70 |
+
While this model demonstrates strong reasoning capabilities, it may still produce inaccurate information ("hallucinations"). Users should implement appropriate guardrails for production deployments.
|
|
|
|
| 71 |
|
| 72 |
---
|
| 73 |
|
| 74 |
+
## 📜 License
|
| 75 |
|
| 76 |
+
This model is released under the **Apache 2.0** license, allowing for academic and commercial use.
|
| 77 |
|
| 78 |
---
|
| 79 |
|
| 80 |
+
<div align="center">
|
| 81 |
+
<b>DeepBrainz AI & Labs</b><br>
|
| 82 |
+
<i>Advancing General Intelligence through Scalable Reasoning</i>
|
| 83 |
+
</div>
|
config.json
CHANGED
|
@@ -10,20 +10,9 @@
|
|
| 10 |
"num_key_value_heads": 8,
|
| 11 |
"head_dim": 128,
|
| 12 |
"max_position_embeddings": 16384,
|
| 13 |
-
"rms_norm_eps": 1e-06,
|
| 14 |
-
"rope_theta": 1000000.0,
|
| 15 |
-
"rope_scaling": null,
|
| 16 |
-
"attention_bias": false,
|
| 17 |
-
"attention_dropout": 0.0,
|
| 18 |
-
"hidden_act": "silu",
|
| 19 |
-
"initializer_range": 0.02,
|
| 20 |
-
"tie_word_embeddings": false,
|
| 21 |
-
"torch_dtype": "bfloat16",
|
| 22 |
-
"transformers_version": "4.45.0",
|
| 23 |
-
"use_cache": true,
|
| 24 |
-
"use_sliding_window": false,
|
| 25 |
"vocab_size": 151936,
|
|
|
|
| 26 |
"bos_token_id": 151643,
|
| 27 |
"eos_token_id": 151645,
|
| 28 |
-
"
|
| 29 |
}
|
|
|
|
| 10 |
"num_key_value_heads": 8,
|
| 11 |
"head_dim": 128,
|
| 12 |
"max_position_embeddings": 16384,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
"vocab_size": 151936,
|
| 14 |
+
"torch_dtype": "bfloat16",
|
| 15 |
"bos_token_id": 151643,
|
| 16 |
"eos_token_id": 151645,
|
| 17 |
+
"tie_word_embeddings": false
|
| 18 |
}
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9a0df1e48b33a5bcc4ec77820f8c6c3b778c4734d10cc11275cf241ee21cbb92
|
| 3 |
+
size 4063515608
|