Update README.md
Browse files
README.md
CHANGED
|
@@ -12,4 +12,68 @@ tags:
|
|
| 12 |
- trl
|
| 13 |
- coder
|
| 14 |
- 7B
|
| 15 |
-
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
- trl
|
| 13 |
- coder
|
| 14 |
- 7B
|
| 15 |
+
---
|
| 16 |
+
# **Viper-Coder-HybridMini-v1.3**
|
| 17 |
+
|
| 18 |
+
Viper-Coder-HybridMini-v1.3 is based on the Qwen 2.5 7B modality architecture, designed to be the **best** for coding and reasoning tasks. It has been fine-tuned on a synthetic dataset leveraging the latest coding logits and CoT datasets, further optimizing its **chain-of-thought (CoT) reasoning** and **logical problem-solving** abilities. The model demonstrates significant improvements in **context understanding, structured data processing, and long-context comprehension**, making it ideal for **complex coding tasks, instruction-following, and text generation**.
|
| 19 |
+
|
| 20 |
+
### **Key Improvements**
|
| 21 |
+
1. **Best-in-Class Coding Proficiency**: Enhanced understanding of programming languages, debugging, and code generation.
|
| 22 |
+
2. **Fine-Tuned Instruction Following**: Optimized for precise responses, structured outputs (e.g., JSON, YAML), and extended text generation (**8K+ tokens**).
|
| 23 |
+
3. **Advanced Logical & Mathematical Reasoning**: Improved multi-step problem-solving and theorem proving.
|
| 24 |
+
4. **Long-Context Mastery**: Handles up to **128K tokens** with an output capability of **8K tokens** per response.
|
| 25 |
+
5. **Multilingual Code Support**: Excels in **Python, JavaScript, C++, Java, SQL**, and other major programming languages, with documentation in **29+ languages**.
|
| 26 |
+
|
| 27 |
+
### **Quickstart with Transformers**
|
| 28 |
+
|
| 29 |
+
```python
|
| 30 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 31 |
+
|
| 32 |
+
model_name = "prithivMLmods/Viper-Coder-HybridMini-v1.3"
|
| 33 |
+
|
| 34 |
+
model = AutoModelForCausalLM.from_pretrained(
|
| 35 |
+
model_name,
|
| 36 |
+
torch_dtype="auto",
|
| 37 |
+
device_map="auto",
|
| 38 |
+
trust_remote_code=True
|
| 39 |
+
)
|
| 40 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
| 41 |
+
|
| 42 |
+
prompt = "Write a Python function to merge two sorted lists."
|
| 43 |
+
messages = [
|
| 44 |
+
{"role": "system", "content": "You are an advanced AI assistant with expert-level coding and reasoning abilities."},
|
| 45 |
+
{"role": "user", "content": prompt}
|
| 46 |
+
]
|
| 47 |
+
text = tokenizer.apply_chat_template(
|
| 48 |
+
messages,
|
| 49 |
+
tokenize=False,
|
| 50 |
+
add_generation_prompt=True
|
| 51 |
+
)
|
| 52 |
+
model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
|
| 53 |
+
|
| 54 |
+
generated_ids = model.generate(
|
| 55 |
+
**model_inputs,
|
| 56 |
+
max_new_tokens=512
|
| 57 |
+
)
|
| 58 |
+
generated_ids = [
|
| 59 |
+
output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
|
| 60 |
+
]
|
| 61 |
+
|
| 62 |
+
response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
|
| 63 |
+
print(response)
|
| 64 |
+
```
|
| 65 |
+
|
| 66 |
+
### **Intended Use**
|
| 67 |
+
- **Elite Coding & Debugging**: Best-in-class model for writing, analyzing, and optimizing code.
|
| 68 |
+
- **Complex Algorithmic Reasoning**: Solves intricate logic problems and algorithm-based challenges.
|
| 69 |
+
- **Scientific & Mathematical Computation**: Advanced support for formulas, equations, and theorem verification.
|
| 70 |
+
- **Structured Data Processing**: Seamlessly handles JSON, XML, SQL, and data pipeline automation.
|
| 71 |
+
- **Multilingual Programming Support**: Proficient in Python, JavaScript, C++, Java, Go, and more.
|
| 72 |
+
- **Extended Technical Content Generation**: Ideal for writing documentation, research papers, and technical blogs.
|
| 73 |
+
|
| 74 |
+
### **Limitations**
|
| 75 |
+
1. **Moderate Computational Demand**: Requires GPUs/TPUs for smooth inference due to **7B parameters**, but more lightweight than larger models.
|
| 76 |
+
2. **Language-Specific Variability**: Performance may vary across different programming languages.
|
| 77 |
+
3. **Possible Error Propagation**: Extended text outputs might introduce logical inconsistencies.
|
| 78 |
+
4. **Limited Real-World Awareness**: The model does not have access to real-time internet updates.
|
| 79 |
+
5. **Prompt Sensitivity**: Performance depends on how well the prompt is structured.
|