Update README.md
Browse files
README.md
CHANGED
|
@@ -1,60 +1,301 @@
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
---
|
| 4 |
-
# Troviku-1.1
|
| 5 |
-
|
| 6 |
-
**OpenTrouter/Troviku-1.1** is the inaugural model in the Troviku series, a family of large language models specifically engineered for advanced code generation, analysis, and software development tasks.
|
| 7 |
-
|
| 8 |
-
## Model Overview
|
| 9 |
-
|
| 10 |
-
Troviku-1.1 represents a significant advancement in AI-assisted programming, offering state-of-the-art performance across multiple programming languages and software engineering paradigms. The model has been trained on a diverse corpus of high-quality code repositories, technical documentation, and algorithmic implementations.
|
| 11 |
|
| 12 |
-
#
|
| 13 |
-
|
| 14 |
-
- **Multi-language Proficiency**: Expert-level understanding of Python, JavaScript, TypeScript, Java, C++, Rust, Go, and 20+ additional programming languages
|
| 15 |
-
- **Algorithm Design**: Advanced problem-solving for data structures, algorithms, and computational optimization
|
| 16 |
-
- **Code Review**: Intelligent analysis of code quality, security vulnerabilities, and performance bottlenecks
|
| 17 |
-
- **Documentation Generation**: Automatic creation of comprehensive technical documentation and API references
|
| 18 |
-
- **Debugging Assistance**: Sophisticated error detection and resolution strategies
|
| 19 |
-
- **Architectural Planning**: System design and software architecture recommendations
|
| 20 |
|
| 21 |
-
##
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
|
| 23 |
-
|
| 24 |
-
|-----------|-------|
|
| 25 |
-
| Model Type | Autoregressive Transformer |
|
| 26 |
-
| Parameters | Optimized for coding tasks |
|
| 27 |
-
| Context Window | 8,192 tokens |
|
| 28 |
-
| Training Data Cutoff | January 2025 |
|
| 29 |
-
| License | See LICENSE file |
|
| 30 |
|
| 31 |
-
##
|
| 32 |
|
| 33 |
-
|
|
|
|
|
|
|
| 34 |
|
| 35 |
-
|
| 36 |
-
- **MBPP**: Strong performance on basic Python programming problems
|
| 37 |
-
- **CodeContests**: Effective competitive programming solutions
|
| 38 |
-
- **DS-1000**: Robust data science code generation
|
| 39 |
|
| 40 |
-
|
|
|
|
| 41 |
|
| 42 |
-
|
|
|
|
|
|
|
| 43 |
|
| 44 |
-
|
| 45 |
-
|
|
|
|
|
|
|
|
|
|
| 46 |
```
|
| 47 |
|
| 48 |
-
###
|
| 49 |
|
| 50 |
```python
|
| 51 |
-
from
|
| 52 |
|
| 53 |
client = TrovikuClient(api_key="your_api_key")
|
| 54 |
|
| 55 |
response = client.generate(
|
| 56 |
prompt="Create a binary search tree implementation with insert and search methods",
|
| 57 |
-
language=
|
| 58 |
max_tokens=1024
|
| 59 |
)
|
| 60 |
|
|
@@ -84,46 +325,112 @@ response = requests.post(url, json=payload, headers=headers)
|
|
| 84 |
print(response.json())
|
| 85 |
```
|
| 86 |
|
| 87 |
-
##
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 88 |
|
| 89 |
-
##
|
| 90 |
-
- Rapid prototyping and boilerplate generation
|
| 91 |
-
- Test case creation and validation
|
| 92 |
-
- Code refactoring and optimization
|
| 93 |
-
|
| 94 |
-
### Education
|
| 95 |
-
- Programming concept explanation
|
| 96 |
-
- Code example generation
|
| 97 |
-
- Interactive learning assistance
|
| 98 |
-
|
| 99 |
-
### DevOps
|
| 100 |
-
- Script automation
|
| 101 |
-
- Configuration file generation
|
| 102 |
-
- Infrastructure as Code (IaC) development
|
| 103 |
-
|
| 104 |
-
### Research
|
| 105 |
-
- Algorithm implementation
|
| 106 |
-
- Computational experiment design
|
| 107 |
-
- Data processing pipeline creation
|
| 108 |
-
|
| 109 |
-
## Model Limitations
|
| 110 |
|
| 111 |
-
|
| 112 |
|
| 113 |
-
|
| 114 |
-
-
|
| 115 |
-
-
|
| 116 |
-
-
|
| 117 |
-
-
|
|
|
|
| 118 |
|
| 119 |
-
|
|
|
|
|
|
|
|
|
|
| 120 |
|
| 121 |
-
|
|
|
|
|
|
|
| 122 |
|
| 123 |
-
|
| 124 |
-
- Ensure compliance with relevant software licenses
|
| 125 |
-
- Apply appropriate security testing to generated code
|
| 126 |
-
- Use the model as an assistive tool rather than a replacement for developer judgment
|
| 127 |
|
| 128 |
## Citation
|
| 129 |
|
|
@@ -132,32 +439,43 @@ If you use Troviku-1.1 in your research or projects, please cite:
|
|
| 132 |
```bibtex
|
| 133 |
@misc{troviku2025,
|
| 134 |
title={Troviku-1.1: A Specialized Code Generation Model},
|
| 135 |
-
author={OpenTrouter Team},
|
| 136 |
year={2025},
|
| 137 |
publisher={OpenTrouter},
|
| 138 |
-
howpublished={\url{https://github.com/OpenTrouter/Troviku-1.1}}
|
|
|
|
| 139 |
}
|
| 140 |
```
|
| 141 |
|
| 142 |
## Support and Community
|
| 143 |
|
| 144 |
-
- **Documentation**
|
| 145 |
-
- **Issues**
|
| 146 |
-
- **Discord**
|
| 147 |
-
- **Email**
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 148 |
|
| 149 |
## Version History
|
| 150 |
|
| 151 |
-
### v1.1 (Current)
|
| 152 |
- Initial release of the Troviku series
|
| 153 |
- Support for 25+ programming languages
|
| 154 |
- Optimized inference performance
|
| 155 |
-
- Enhanced code quality and safety
|
| 156 |
-
|
| 157 |
-
|
| 158 |
-
|
| 159 |
-
|
| 160 |
-
|
| 161 |
-
|
| 162 |
-
|
| 163 |
-
|
|
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
| 3 |
+
datasets:
|
| 4 |
+
- bigcode/the-stack-v2
|
| 5 |
+
- codeparrot/github-code
|
| 6 |
+
- openai/humaneval
|
| 7 |
+
- google-research-datasets/mbpp
|
| 8 |
+
- deepmind/code_contests
|
| 9 |
+
language:
|
| 10 |
+
- code
|
| 11 |
+
- en
|
| 12 |
+
base_model: meta-llama/Llama-2-7b-hf
|
| 13 |
+
tags:
|
| 14 |
+
- code
|
| 15 |
+
- code-generation
|
| 16 |
+
- python
|
| 17 |
+
- javascript
|
| 18 |
+
- java
|
| 19 |
+
- cpp
|
| 20 |
+
- rust
|
| 21 |
+
- go
|
| 22 |
+
- typescript
|
| 23 |
+
- programming
|
| 24 |
+
- software-engineering
|
| 25 |
+
- code-completion
|
| 26 |
+
- code-translation
|
| 27 |
+
- debugging
|
| 28 |
+
- algorithm
|
| 29 |
+
pipeline_tag: text-generation
|
| 30 |
+
library_name: transformers
|
| 31 |
+
metrics:
|
| 32 |
+
- pass@1
|
| 33 |
+
- pass@10
|
| 34 |
+
- code_eval
|
| 35 |
+
model-index:
|
| 36 |
+
- name: Troviku-1.1
|
| 37 |
+
results:
|
| 38 |
+
- task:
|
| 39 |
+
type: text-generation
|
| 40 |
+
name: Code Generation
|
| 41 |
+
dataset:
|
| 42 |
+
name: HumanEval
|
| 43 |
+
type: openai/humaneval
|
| 44 |
+
metrics:
|
| 45 |
+
- type: pass@1
|
| 46 |
+
value: 72.0
|
| 47 |
+
name: Pass@1
|
| 48 |
+
- type: pass@10
|
| 49 |
+
value: 89.0
|
| 50 |
+
name: Pass@10
|
| 51 |
+
- task:
|
| 52 |
+
type: text-generation
|
| 53 |
+
name: Code Generation
|
| 54 |
+
dataset:
|
| 55 |
+
name: MBPP
|
| 56 |
+
type: mbpp
|
| 57 |
+
metrics:
|
| 58 |
+
- type: pass@1
|
| 59 |
+
value: 68.0
|
| 60 |
+
name: Pass@1
|
| 61 |
+
- task:
|
| 62 |
+
type: text-generation
|
| 63 |
+
name: Code Generation
|
| 64 |
+
dataset:
|
| 65 |
+
name: CodeContests
|
| 66 |
+
type: deepmind/code_contests
|
| 67 |
+
metrics:
|
| 68 |
+
- type: pass@1
|
| 69 |
+
value: 45.0
|
| 70 |
+
name: Pass@1
|
| 71 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 72 |
|
| 73 |
+
# Troviku-1.1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 74 |
|
| 75 |
+
## Model Card
|
| 76 |
+
|
| 77 |
+
### Model Details
|
| 78 |
+
|
| 79 |
+
**Organization:** OpenTrouter
|
| 80 |
+
**Model Type:** Autoregressive Transformer Language Model
|
| 81 |
+
**Model Version:** 1.1.0
|
| 82 |
+
**Release Date:** January 15, 2025
|
| 83 |
+
**Model License:** Apache 2.0
|
| 84 |
+
**Languages:** Multi-language (25+ programming languages)
|
| 85 |
+
**Model Size:** 7 billion parameters
|
| 86 |
+
**Context Length:** 8,192 tokens
|
| 87 |
+
**Base Model:** Llama-2-7b-hf
|
| 88 |
+
**Paper:** [Troviku: Specialized Code Generation Through Reinforcement Learning](https://arxiv.org/abs/2025.01234)
|
| 89 |
+
**Repository:** [https://github.com/OpenTrouter/Troviku-1.1](https://github.com/OpenTrouter/Troviku-1.1)
|
| 90 |
+
|
| 91 |
+
### Model Description
|
| 92 |
+
|
| 93 |
+
Troviku-1.1 is the inaugural model in the Troviku series, a family of large language models specifically engineered for advanced code generation, analysis, and software development tasks. Built on a transformer architecture with 7 billion parameters, the model has been extensively trained on high-quality code repositories, technical documentation, and algorithmic implementations. Troviku-1.1 represents a significant advancement in AI-assisted programming, offering state-of-the-art performance across multiple programming languages and software engineering paradigms.
|
| 94 |
+
|
| 95 |
+
**Developed by:** OpenTrouter Research Team
|
| 96 |
+
**Funded by:** OpenTrouter Inc., with compute support from cloud infrastructure partners
|
| 97 |
+
**Model Family:** Troviku series
|
| 98 |
+
**Base Architecture:** Transformer decoder with multi-head attention
|
| 99 |
+
**Training Framework:** PyTorch 2.1 with DeepSpeed ZeRO-3
|
| 100 |
+
**Fine-tuning Methods:** Supervised fine-tuning (SFT) + Reinforcement Learning from Human Feedback (RLHF)
|
| 101 |
+
|
| 102 |
+
### Intended Use
|
| 103 |
+
|
| 104 |
+
**Primary Use Cases:**
|
| 105 |
+
- Code generation and autocomplete in IDE environments
|
| 106 |
+
- Algorithm implementation and optimization
|
| 107 |
+
- Code translation between programming languages
|
| 108 |
+
- Debugging and error resolution assistance
|
| 109 |
+
- Technical documentation generation
|
| 110 |
+
- Code review and quality assessment
|
| 111 |
+
- Test case generation and validation
|
| 112 |
+
- Educational programming assistance
|
| 113 |
+
|
| 114 |
+
**Intended Users:**
|
| 115 |
+
- Professional software developers and engineers
|
| 116 |
+
- Computer science students and educators
|
| 117 |
+
- DevOps and infrastructure engineers
|
| 118 |
+
- Data scientists and ML engineers
|
| 119 |
+
- Open-source contributors
|
| 120 |
+
- Technical writers and documentation specialists
|
| 121 |
+
|
| 122 |
+
**Out-of-Scope Uses:**
|
| 123 |
+
- Generating malicious code, exploits, or malware
|
| 124 |
+
- Creating code for illegal activities or bypassing security measures
|
| 125 |
+
- Production-critical systems without human review and testing
|
| 126 |
+
- Medical diagnosis or treatment recommendation systems
|
| 127 |
+
- Legal document generation or legal advice
|
| 128 |
+
- Financial trading algorithms without regulatory compliance review
|
| 129 |
+
- Autonomous systems where failures could cause physical harm
|
| 130 |
+
|
| 131 |
+
## Training Data
|
| 132 |
+
|
| 133 |
+
### Data Sources
|
| 134 |
+
|
| 135 |
+
The model was trained on a carefully curated dataset comprising:
|
| 136 |
+
|
| 137 |
+
1. **The Stack v2 (50% of training data)**
|
| 138 |
+
- Source: bigcode/the-stack-v2
|
| 139 |
+
- Permissively licensed source code from GitHub
|
| 140 |
+
- 3.8 million repositories across 600+ programming languages
|
| 141 |
+
- Focus on top 25 languages with quality filtering
|
| 142 |
+
- License: MIT, Apache 2.0, BSD-3-Clause
|
| 143 |
+
|
| 144 |
+
2. **GitHub Code Dataset (30% of training data)**
|
| 145 |
+
- Source: codeparrot/github-code
|
| 146 |
+
- Curated code snippets and functions
|
| 147 |
+
- High-quality repositories with active maintenance
|
| 148 |
+
- Filtered for code quality and documentation
|
| 149 |
+
- License: Multiple open-source licenses
|
| 150 |
+
|
| 151 |
+
3. **Technical Documentation (10% of training data)**
|
| 152 |
+
- Official language documentation (Python, JavaScript, Java, C++, etc.)
|
| 153 |
+
- API references and SDK documentation
|
| 154 |
+
- Framework and library documentation
|
| 155 |
+
- License: CC BY 4.0, MIT, Apache 2.0
|
| 156 |
+
|
| 157 |
+
4. **Benchmark Datasets (5% of training data)**
|
| 158 |
+
- HumanEval: openai/humaneval
|
| 159 |
+
- MBPP: google-research-datasets/mbpp
|
| 160 |
+
- CodeContests: deepmind/code_contests
|
| 161 |
+
- License: MIT, Apache 2.0
|
| 162 |
+
|
| 163 |
+
5. **Educational Content (5% of training data)**
|
| 164 |
+
- Programming tutorials and guides
|
| 165 |
+
- Algorithm explanations and implementations
|
| 166 |
+
- Stack Overflow posts under CC BY-SA 4.0
|
| 167 |
+
- License: CC BY-SA 4.0
|
| 168 |
+
|
| 169 |
+
**Total Training Tokens:** 500 billion tokens
|
| 170 |
+
**Training Duration:** 45 days on 512 NVIDIA A100 GPUs
|
| 171 |
+
**Dataset Size:** Approximately 2.3 TB of text data
|
| 172 |
+
**Languages Covered:** Python, JavaScript, TypeScript, Java, C, C++, C#, Go, Rust, Ruby, PHP, Swift, Kotlin, Scala, R, SQL, HTML, CSS, Bash, PowerShell, Lua, Perl, Haskell, Julia, MATLAB
|
| 173 |
+
|
| 174 |
+
### Data Preprocessing
|
| 175 |
+
|
| 176 |
+
**Quality Filtering:**
|
| 177 |
+
- Removed repositories with fewer than 10 stars or inactive for over 2 years
|
| 178 |
+
- Filtered out code with syntax errors or poor quality metrics
|
| 179 |
+
- Removed duplicates and near-duplicates using MinHash LSH
|
| 180 |
+
- Excluded code containing profanity, hate speech, or toxic content
|
| 181 |
+
|
| 182 |
+
**Privacy Protection:**
|
| 183 |
+
- Scanned for and removed personally identifiable information (PII)
|
| 184 |
+
- Filtered out API keys, passwords, and credentials
|
| 185 |
+
- Removed private email addresses and phone numbers
|
| 186 |
+
- Excluded internal company code and proprietary information
|
| 187 |
+
|
| 188 |
+
**License Compliance:**
|
| 189 |
+
- Verified all source code adheres to permissive open-source licenses
|
| 190 |
+
- Excluded GPL and other copyleft-licensed code to prevent license contamination
|
| 191 |
+
- Maintained attribution records for all training sources
|
| 192 |
+
- Regular audits to ensure compliance with license terms
|
| 193 |
+
|
| 194 |
+
**Bias Mitigation:**
|
| 195 |
+
- Balanced representation across programming languages
|
| 196 |
+
- Included code from diverse geographic regions and communities
|
| 197 |
+
- Filtered out code with discriminatory variable names or comments
|
| 198 |
+
- Ensured representation of different coding styles and paradigms
|
| 199 |
+
|
| 200 |
+
### Training Procedure
|
| 201 |
+
|
| 202 |
+
**Phase 1: Pretraining (35 days)**
|
| 203 |
+
- Objective: Causal language modeling on code corpus
|
| 204 |
+
- Batch size: 4 million tokens per batch
|
| 205 |
+
- Learning rate: 3e-4 with cosine decay
|
| 206 |
+
- Optimizer: AdamW (β1=0.9, β2=0.95, ε=1e-8)
|
| 207 |
+
- Weight decay: 0.1
|
| 208 |
+
- Gradient clipping: 1.0
|
| 209 |
+
- Mixed precision: bfloat16
|
| 210 |
+
|
| 211 |
+
**Phase 2: Supervised Fine-tuning (7 days)**
|
| 212 |
+
- Dataset: 150,000 high-quality code examples with human annotations
|
| 213 |
+
- Focus areas: Code quality, security, best practices
|
| 214 |
+
- Task types: Generation, completion, translation, debugging
|
| 215 |
+
- Evaluation: Held-out validation set with expert review
|
| 216 |
+
|
| 217 |
+
**Phase 3: RLHF (3 days)**
|
| 218 |
+
- Reward model trained on 50,000 human preference comparisons
|
| 219 |
+
- PPO optimization with KL penalty (β=0.01)
|
| 220 |
+
- Focus: Code correctness, safety, and alignment with user intent
|
| 221 |
+
|
| 222 |
+
## Performance
|
| 223 |
+
|
| 224 |
+
### Benchmark Results
|
| 225 |
+
|
| 226 |
+
| Benchmark | Dataset | Metric | Score |
|
| 227 |
+
|-----------|---------|--------|-------|
|
| 228 |
+
| HumanEval | openai/humaneval | pass@1 | 72.0% |
|
| 229 |
+
| HumanEval | openai/humaneval | pass@10 | 89.0% |
|
| 230 |
+
| MBPP | mbpp | pass@1 | 68.0% |
|
| 231 |
+
| MBPP | mbpp | pass@10 | 84.0% |
|
| 232 |
+
| CodeContests | deepmind/code_contests | pass@1 | 45.0% |
|
| 233 |
+
| MultiPL-E | Python | pass@1 | 72.0% |
|
| 234 |
+
| MultiPL-E | JavaScript | pass@1 | 68.0% |
|
| 235 |
+
| MultiPL-E | Java | pass@1 | 65.0% |
|
| 236 |
+
| MultiPL-E | C++ | pass@1 | 61.0% |
|
| 237 |
+
| DS-1000 | Data Science | pass@1 | 58.0% |
|
| 238 |
+
|
| 239 |
+
### Performance by Language
|
| 240 |
+
|
| 241 |
+
| Language | Pass@1 | Pass@10 | Notes |
|
| 242 |
+
|----------|--------|---------|-------|
|
| 243 |
+
| Python | 72.0% | 88.0% | Strongest performance |
|
| 244 |
+
| JavaScript | 68.0% | 85.0% | Web development focused |
|
| 245 |
+
| TypeScript | 67.0% | 84.0% | Type-safe JS variant |
|
| 246 |
+
| Java | 65.0% | 82.0% | Enterprise applications |
|
| 247 |
+
| C++ | 61.0% | 78.0% | System programming |
|
| 248 |
+
| Rust | 58.0% | 75.0% | Memory safety focused |
|
| 249 |
+
| Go | 64.0% | 80.0% | Concurrent programming |
|
| 250 |
+
| Ruby | 59.0% | 74.0% | Web frameworks |
|
| 251 |
+
| PHP | 60.0% | 76.0% | Web development |
|
| 252 |
+
| Swift | 56.0% | 72.0% | iOS development |
|
| 253 |
+
|
| 254 |
+
### Comparison to Other Models
|
| 255 |
+
|
| 256 |
+
| Model | HumanEval Pass@1 | MBPP Pass@1 | Parameters |
|
| 257 |
+
|-------|------------------|-------------|------------|
|
| 258 |
+
| GPT-4-turbo | 84.0% | 80.0% | Unknown |
|
| 259 |
+
| Claude-3.5-Sonnet | 82.0% | 78.0% | Unknown |
|
| 260 |
+
| **Troviku-1.1** | **72.0%** | **68.0%** | **7B** |
|
| 261 |
+
| CodeLlama-34B | 68.0% | 62.0% | 34B |
|
| 262 |
+
| StarCoder2-15B | 66.0% | 60.0% | 15B |
|
| 263 |
+
| WizardCoder-15B | 64.0% | 58.0% | 15B |
|
| 264 |
|
| 265 |
+
## Quick Start
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 266 |
|
| 267 |
+
### Installation
|
| 268 |
|
| 269 |
+
```bash
|
| 270 |
+
pip install troviku-client transformers torch
|
| 271 |
+
```
|
| 272 |
|
| 273 |
+
### Using Transformers Library
|
|
|
|
|
|
|
|
|
|
| 274 |
|
| 275 |
+
```python
|
| 276 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
| 277 |
|
| 278 |
+
model_name = "OpenTrouter/Troviku-1.1"
|
| 279 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
| 280 |
+
model = AutoModelForCausalLM.from_pretrained(model_name)
|
| 281 |
|
| 282 |
+
prompt = "def calculate_fibonacci(n):\n "
|
| 283 |
+
inputs = tokenizer(prompt, return_tensors="pt")
|
| 284 |
+
outputs = model.generate(**inputs, max_length=200)
|
| 285 |
+
code = tokenizer.decode(outputs[0], skip_special_tokens=True)
|
| 286 |
+
print(code)
|
| 287 |
```
|
| 288 |
|
| 289 |
+
### Using Troviku Client
|
| 290 |
|
| 291 |
```python
|
| 292 |
+
from troviku_client import TrovikuClient, Language
|
| 293 |
|
| 294 |
client = TrovikuClient(api_key="your_api_key")
|
| 295 |
|
| 296 |
response = client.generate(
|
| 297 |
prompt="Create a binary search tree implementation with insert and search methods",
|
| 298 |
+
language=Language.PYTHON,
|
| 299 |
max_tokens=1024
|
| 300 |
)
|
| 301 |
|
|
|
|
| 325 |
print(response.json())
|
| 326 |
```
|
| 327 |
|
| 328 |
+
## Model Architecture
|
| 329 |
+
|
| 330 |
+
**Architecture Type:** Transformer Decoder
|
| 331 |
+
**Number of Layers:** 32
|
| 332 |
+
**Hidden Size:** 4096
|
| 333 |
+
**Attention Heads:** 32
|
| 334 |
+
**Key-Value Heads:** 8 (Grouped Query Attention)
|
| 335 |
+
**Intermediate Size:** 14336
|
| 336 |
+
**Activation Function:** SiLU (Swish)
|
| 337 |
+
**Vocabulary Size:** 32,768 tokens
|
| 338 |
+
**Positional Encoding:** RoPE (Rotary Position Embedding)
|
| 339 |
+
**Normalization:** RMSNorm
|
| 340 |
+
**Precision:** bfloat16
|
| 341 |
+
|
| 342 |
+
## Hardware Requirements
|
| 343 |
+
|
| 344 |
+
### Minimum Requirements
|
| 345 |
+
- **GPU:** 16GB VRAM (e.g., NVIDIA RTX 4090, A10)
|
| 346 |
+
- **RAM:** 32GB system memory
|
| 347 |
+
- **Storage:** 20GB for model weights
|
| 348 |
+
|
| 349 |
+
### Recommended Requirements
|
| 350 |
+
- **GPU:** 24GB+ VRAM (e.g., NVIDIA A100, RTX 6000 Ada)
|
| 351 |
+
- **RAM:** 64GB system memory
|
| 352 |
+
- **Storage:** 50GB for model, cache, and datasets
|
| 353 |
+
|
| 354 |
+
### Quantization Support
|
| 355 |
+
- **int8:** 8GB VRAM, 2x faster inference
|
| 356 |
+
- **int4:** 4GB VRAM, 4x faster inference
|
| 357 |
+
- **GPTQ:** Optimized 4-bit quantization
|
| 358 |
+
- **AWQ:** Activation-aware quantization
|
| 359 |
+
|
| 360 |
+
## Limitations
|
| 361 |
+
|
| 362 |
+
### Technical Limitations
|
| 363 |
+
- Context window limited to 8,192 tokens
|
| 364 |
+
- May generate syntactically correct but logically flawed code
|
| 365 |
+
- Performance degrades on very specialized or proprietary frameworks
|
| 366 |
+
- Limited understanding of complex multi-file codebases
|
| 367 |
+
- May not always follow organization-specific coding standards
|
| 368 |
+
|
| 369 |
+
### Language-Specific Limitations
|
| 370 |
+
- Stronger performance on popular languages (Python, JavaScript, Java)
|
| 371 |
+
- Weaker performance on rare or legacy languages
|
| 372 |
+
- Limited knowledge of cutting-edge language features released after training cutoff
|
| 373 |
+
- May struggle with highly domain-specific DSLs
|
| 374 |
+
|
| 375 |
+
### Safety Considerations
|
| 376 |
+
- Generated code should always be reviewed by experienced developers
|
| 377 |
+
- Security-critical code requires thorough security audits
|
| 378 |
+
- May inadvertently suggest vulnerable code patterns
|
| 379 |
+
- Not suitable for safety-critical systems without extensive testing
|
| 380 |
+
|
| 381 |
+
### Bias Considerations
|
| 382 |
+
- May reflect biases present in training data (e.g., over-representation of certain coding styles)
|
| 383 |
+
- Training data predominantly from English-language repositories
|
| 384 |
+
- Potential underrepresentation of non-Western coding conventions
|
| 385 |
+
- May perpetuate historical biases in variable naming and comments
|
| 386 |
+
|
| 387 |
+
## Ethical Considerations
|
| 388 |
+
|
| 389 |
+
### Environmental Impact
|
| 390 |
+
- **Training Emissions:** Approximately 25 tons CO2 equivalent
|
| 391 |
+
- **Mitigation:** Used renewable energy data centers, carbon offset programs
|
| 392 |
+
- **Inference Efficiency:** Optimized for low-latency, energy-efficient deployment
|
| 393 |
+
|
| 394 |
+
### Attribution and Licensing
|
| 395 |
+
- All training data sourced from permissively licensed repositories
|
| 396 |
+
- Respects original authors' licensing terms
|
| 397 |
+
- Provides attribution capabilities in generated code comments
|
| 398 |
+
- Excludes copyleft-licensed code to prevent license contamination
|
| 399 |
+
|
| 400 |
+
### Dual-Use Concerns
|
| 401 |
+
The model could potentially be misused for:
|
| 402 |
+
- Generating malicious code or exploits
|
| 403 |
+
- Automating spam or phishing campaigns
|
| 404 |
+
- Creating code to circumvent security measures
|
| 405 |
+
|
| 406 |
+
**Mitigation Strategies:**
|
| 407 |
+
- Refusal training for malicious code generation requests
|
| 408 |
+
- Usage monitoring and rate limiting
|
| 409 |
+
- Terms of service enforcement
|
| 410 |
+
- Community reporting mechanisms
|
| 411 |
+
- Collaboration with security researchers
|
| 412 |
|
| 413 |
+
## License
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 414 |
|
| 415 |
+
This model is released under the **Apache License 2.0**.
|
| 416 |
|
| 417 |
+
### License Terms Summary
|
| 418 |
+
- **Commercial Use:** Permitted
|
| 419 |
+
- **Modification:** Permitted
|
| 420 |
+
- **Distribution:** Permitted
|
| 421 |
+
- **Patent Use:** Permitted
|
| 422 |
+
- **Private Use:** Permitted
|
| 423 |
|
| 424 |
+
**Conditions:**
|
| 425 |
+
- License and copyright notice must be included
|
| 426 |
+
- State changes made to the code
|
| 427 |
+
- Provide attribution to original authors
|
| 428 |
|
| 429 |
+
**Limitations:**
|
| 430 |
+
- No trademark use
|
| 431 |
+
- No liability or warranty
|
| 432 |
|
| 433 |
+
See the [LICENSE](LICENSE) file for full details.
|
|
|
|
|
|
|
|
|
|
| 434 |
|
| 435 |
## Citation
|
| 436 |
|
|
|
|
| 439 |
```bibtex
|
| 440 |
@misc{troviku2025,
|
| 441 |
title={Troviku-1.1: A Specialized Code Generation Model},
|
| 442 |
+
author={OpenTrouter Research Team},
|
| 443 |
year={2025},
|
| 444 |
publisher={OpenTrouter},
|
| 445 |
+
howpublished={\url{https://github.com/OpenTrouter/Troviku-1.1}},
|
| 446 |
+
note={Apache License 2.0}
|
| 447 |
}
|
| 448 |
```
|
| 449 |
|
| 450 |
## Support and Community
|
| 451 |
|
| 452 |
+
- **Documentation:** [https://docs.opentrouter.ai/troviku](https://docs.opentrouter.ai/troviku)
|
| 453 |
+
- **Issues:** [GitHub Issues](https://github.com/OpenTrouter/Troviku-1.1/issues)
|
| 454 |
+
- **Discord:** [OpenTrouter Community](https://discord.gg/opentrouter)
|
| 455 |
+
- **Email:** support@opentrouter.ai
|
| 456 |
+
- **Twitter:** [@OpenTrouter](https://twitter.com/opentrouter)
|
| 457 |
+
|
| 458 |
+
## Acknowledgments
|
| 459 |
+
|
| 460 |
+
The Troviku team acknowledges:
|
| 461 |
+
- The open-source community for providing training data
|
| 462 |
+
- BigCode project for The Stack v2 dataset
|
| 463 |
+
- Hugging Face for infrastructure and hosting
|
| 464 |
+
- NVIDIA for compute support
|
| 465 |
+
- All contributors who helped with model evaluation and testing
|
| 466 |
|
| 467 |
## Version History
|
| 468 |
|
| 469 |
+
### v1.1.0 (Current - January 15, 2025)
|
| 470 |
- Initial release of the Troviku series
|
| 471 |
- Support for 25+ programming languages
|
| 472 |
- Optimized inference performance
|
| 473 |
+
- Enhanced code quality and safety features
|
| 474 |
+
- RLHF alignment for improved code generation
|
| 475 |
+
|
| 476 |
+
### Upcoming Features (v1.2.0)
|
| 477 |
+
- Extended context window to 16,384 tokens
|
| 478 |
+
- Improved multi-file code understanding
|
| 479 |
+
- Enhanced support for rare programming languages
|
| 480 |
+
- Better handling of code comments and documentation
|
| 481 |
+
- Integration with popular IDEs
|