Text Generation
Transformers
Safetensors
English
mistral
Code Generation
Logical Reasoning
Problem Solving
Text Generation
AI Programming Assistant
text-generation-inference
5-bit
exl2
Instructions to use kisimoff/The-Trinity-Coder-7B_exl2_5bpw with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use kisimoff/The-Trinity-Coder-7B_exl2_5bpw with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="kisimoff/The-Trinity-Coder-7B_exl2_5bpw")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("kisimoff/The-Trinity-Coder-7B_exl2_5bpw") model = AutoModelForCausalLM.from_pretrained("kisimoff/The-Trinity-Coder-7B_exl2_5bpw", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use kisimoff/The-Trinity-Coder-7B_exl2_5bpw with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "kisimoff/The-Trinity-Coder-7B_exl2_5bpw" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "kisimoff/The-Trinity-Coder-7B_exl2_5bpw", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/kisimoff/The-Trinity-Coder-7B_exl2_5bpw
- SGLang
How to use kisimoff/The-Trinity-Coder-7B_exl2_5bpw with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "kisimoff/The-Trinity-Coder-7B_exl2_5bpw" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "kisimoff/The-Trinity-Coder-7B_exl2_5bpw", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "kisimoff/The-Trinity-Coder-7B_exl2_5bpw" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "kisimoff/The-Trinity-Coder-7B_exl2_5bpw", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use kisimoff/The-Trinity-Coder-7B_exl2_5bpw with Docker Model Runner:
docker model run hf.co/kisimoff/The-Trinity-Coder-7B_exl2_5bpw
| license: apache-2.0 | |
| language: | |
| - en | |
| library_name: transformers | |
| tags: | |
| - Code Generation | |
| - Logical Reasoning | |
| - Problem Solving | |
| - Text Generation | |
| - AI Programming Assistant | |
| <h1>The-Trinity-Coder-7B: 3 Blended Coder Models - Unified Coding Intelligence</h1> | |
|  | |
| <p><strong>Overview</strong></p> | |
| <p>The-Trinity-Coder-7B derives from the fusion of three distinct AI models, each specializing in unique aspects of coding and programming challenges. This model unifies the capabilities of beowolx_CodeNinja-1.0-OpenChat-7B, NeuralExperiment-7b-MagicCoder, and Speechless-Zephyr-Code-Functionary-7B, creating a versatile and powerful new blended model. The integration of these models was achieved through a merging technique, in order to harmonize their strengths and mitigate their individual weaknesses.</p> | |
| <h2>The Blend</h2> | |
| <ul> | |
| <li><strong>Comprehensive Coding Knowledge:</strong> TrinityAI combines knowledge of coding instructions across a wide array of programming languages, including Python, C, C++, Rust, Java, JavaScript, and more, making it a versatile assistant for coding projects of any scale.</li> | |
| <li><strong>Advanced Code Completion:</strong> With its extensive context window, TrinityAI excels in project-level code completion, offering suggestions that are contextually relevant and syntactically accurate.</li> | |
| <li><strong>Specialized Skills Integration:</strong> The-Trinity-Coder provides code completion but is also good at logical reasoning for its size, mathematical problem-solving, and understanding complex programming concepts.</li> | |
| </ul> | |
| <h2>Model Synthesis Approach</h2> | |
| <p>The blending of the three models into TrinityAI utilized a unique merging technique that focused on preserving the core strengths of each component model:</p> | |
| <ul> | |
| <li><strong>beowolx_CodeNinja-1.0-OpenChat-7B:</strong> This model brings an expansive database of coding instructions, refined through Supervised Fine Tuning, making it an advanced coding assistant.</li> | |
| <li><strong>NeuralExperiment-7b-MagicCoder:</strong> Trained on datasets focusing on logical reasoning, mathematics, and programming, this model enhances TrinityAI's problem-solving and logical reasoning capabilities.</li> | |
| <li><strong>Speechless-Zephyr-Code-Functionary-7B:</strong> Part of the Moloras experiments, this model contributes enhanced coding proficiency and dynamic skill integration through its unique LoRA modules.</li> | |
| </ul> | |
| <h2>Usage and Implementation</h2> | |
| <pre><code>from transformers import AutoTokenizer, AutoModelForCausalLM | |
| model_name = "YourRepository/The-Trinity-Coder-7B" | |
| tokenizer = AutoTokenizer.from_pretrained(model_name) | |
| model = AutoModelForCausalLM.from_pretrained(model_name) | |
| prompt = "Your prompt here" | |
| inputs = tokenizer(prompt, return_tensors="pt") | |
| outputs = model.generate(**inputs) | |
| print(tokenizer.decode(outputs[0], skip_special_tokens=True)) | |
| </code></pre> | |
| <h2>Acknowledgments</h2> | |
| <p>Special thanks to the creators and contributors of CodeNinja, NeuralExperiment-7b-MagicCoder, and Speechless-Zephyr-Code-Functionary-7B for providing the base models for blending.</p> | |
| --- | |
| base_model: [] | |
| library_name: transformers | |
| tags: | |
| - mergekit | |
| - merge | |
| --- | |
| # merged_folder | |
| This is a merge of pre-trained language models created using [mergekit](https://github.com/cg123/mergekit). | |
| ## Merge Details | |
| ### Merge Method | |
| This model was merged using the [TIES](https://arxiv.org/abs/2306.01708) merge method using uukuguy_speechless-zephyr-code-functionary-7b as a base. | |
| ### Models Merged | |
| The following models were included in the merge: | |
| *uukuguy_speechless-zephyr-code-functionary-7b | |
| * Kukedlc_NeuralExperiment-7b-MagicCoder-v7.5 | |
| * beowolx_CodeNinja-1.0-OpenChat-7B | |
| ### Configuration | |
| The following YAML configuration was used to produce this model: | |
| ```yaml | |
| base_model: X:/text-generation-webui-main/models/uukuguy_speechless-zephyr-code-functionary-7b | |
| models: | |
| - model: X:/text-generation-webui-main/models/beowolx_CodeNinja-1.0-OpenChat-7B | |
| parameters: | |
| density: 0.5 | |
| weight: 0.4 | |
| - model: X:/text-generation-webui-main/models/Kukedlc_NeuralExperiment-7b-MagicCoder-v7.5 | |
| parameters: | |
| density: 0.5 | |
| weight: 0.4 | |
| merge_method: ties | |
| parameters: | |
| normalize: true | |
| dtype: float16 | |
| ``` |