How to use from the
Use from the
llama-cpp-python library
# !pip install llama-cpp-python

from llama_cpp import Llama

llm = Llama.from_pretrained(
	repo_id="Lautloserspieler/mistral-code-architect-7b",
	filename="Mistral-Code-Architect-7b.gguf",
)
llm.create_chat_completion(
	messages = [
		{
			"role": "user",
			"content": "What is the capital of France?"
		}
	]
)

Mistral Code Architect 7B (GGUF)

Mistral Code Architect 7B is a highly specialized, locally fine-tuned large language model designed for advanced software development, deep debugging, and cybersecurity analysis. It has been trained to act as an autonomous coding assistant that provides robust, production-ready code and reasoning traces.

πŸš€ Model Details

  • Architecture: Mistral 7B (Quantized to GGUF q4_k_m)
  • Base Model: unsloth/mistral-7b-instruct-v0.3-bnb-4bit
  • Context Length: 4096 tokens
  • Training Framework: Unsloth (QLoRA)
  • Training Hardware: NVIDIA RTX 5070 (12 GB VRAM)
  • Language Support: Dynamic (Optimized for English and German)

πŸ“Š Training Data & Methodology

The model was fine-tuned using a curated mix of approximately 25,000 high-quality coding and security samples. The training pipeline heavily utilized packing (packing=True) to maximize context efficiency during the QLoRA fine-tuning process.

The dataset mixture includes:

  • CodeFeedback: Filtered instruction-following for robust code generation.
  • WebDev-Arena: Preference-based web development queries (React, Next.js, Backend).
  • CyberGym & Security-Code: Specialized datasets focusing on vulnerability detection, memory safety, and secure patching strategies.
  • IFEval: To strictly adhere to system constraints and formatting instructions.
  • OpenCodeInterpreter: For advanced reasoning and step-by-step logic.

πŸ’» Usage with Ollama (Recommended)

Since this model is provided in the highly efficient .gguf format, you can easily run it locally using Ollama. The model is trained to dynamically adapt to the user's language.

1. Download the Model: Download the Mistral-Code-Architect-7b.gguf file from the Files and versions tab.

2. Create a Modelfile: In the same directory as your downloaded .gguf file, create a file named Modelfile and paste the following configuration. This includes a dynamic system prompt to ensure the model mirrors your language:

FROM ./Mistral-Code-Architect-7b.gguf

SYSTEM "You are an expert software developer and architect. Always respond in the exact language the user is speaking. If the user writes in English, reply in English. If the user writes in German, reply in German. Provide precise, secure, and highly technical answers."

TEMPLATE "{{ if .System }}<|im_start|>system\n{{ .System }}<|im_end|>\n{{ end }}{{ if .Prompt }}<|im_start|>user\n{{ .Prompt }}<|im_end|>\n{{ end }}<|im_start|>assistant\n{{ .Response }}<|im_end|>"

PARAMETER stop "<|im_start|>"
PARAMETER stop "<|im_end|>"

3. Build and Run: Open your terminal in that directory and run:

ollama create code-architect -f Modelfile
ollama run code-architect

⚠️ Limitations: While highly capable in generating code and identifying vulnerabilities, this model can still hallucinate complex APIs or suggest outdated libraries. Always review and test the generated code before deploying it to a production environment. The model is specifically fine-tuned for software engineering tasks and might underperform on general creative writing tasks.

Downloads last month
208
GGUF
Model size
7B params
Architecture
llama
Hardware compatibility
Log In to add your hardware

We're not able to determine the quantization variants.

Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for Lautloserspieler/mistral-code-architect-7b