CoolFace
Modelpublic

techpro-saida/msci_software_engineering_slm_v1

sourceHugging Faceapache-2.0updated 11mo agoView on Hugging Face
1likes8downloads
Model Card

Model Card

This model is a QLoRA fine-tuned variant of Mistral-7B, optimized for software engineering, code generation, and technical Q&A tasks. It was trained on a curated dataset of software design patterns, debugging tips, Python code snippets, and AI engineering discussions to improve reasoning and contextual understanding for software-related queries.

Model Details

  • Base Model: mistralai/Mistral-7B-v0.1
  • Fine-tuning Type: QLoRA (4-bit quantization)
  • Framework: Hugging Face Transformers + PEFT + bitsandbytes
  • Tokenizer: Same as base model (AutoTokenizer.from_pretrained(base_model, use_fast=True))
  • Padding Token: tokenizer.pad_token = tokenizer.eos_token
  • Training Objective: Causal language modeling

Model Configuration

**Parameter****Value**
Model Typemistral
ArchitectureMistralForCausalLM
Vocab Size32,768
Max Position Embeddings32,768
Hidden Size4,096
Intermediate Size14,336
Number of Hidden Layers32
Number of Attention Heads32
Number of Key-Value Heads8
Hidden Activationsilu
Initializer Range0.02
RMS Norm Epsilon1e-5
Dropout (Attention)0.0
Use CacheTrue
ROPE Theta1,000,000.0
Quantization Methodbitsandbytes
Quantization Config4-bit (nf4), bfloat16 compute dtype
Compute Dtypefloat16
Load In 4bit✅ Yes
Load In 8bit❌ No
Tie Word EmbeddingsFalse
Is Encoder-DecoderFalse
BOS Token ID1
EOS Token ID2
Pad Token IDNone
Generation Settings
→ Max Length20
→ Min Length0
→ Temperature1.0
→ Top-k50
→ Top-p1.0
→ Num Beams1
→ Repetition Penalty1.0
→ Early StoppingFalse
ID → Label Map{0: LABEL_0, 1: LABEL_1}
Label → ID Map{'LABEL0': 0, 'LABEL1': 1}
Training FrameworkTransformers v4.57.1
Quant Librarybitsandbytes
Local Path / Repo./msci_software_engineering_slm_v1

Quantization

**Parameter****Value**
_load_in_4bitTrue
_load_in_8bitFalse
bnb_4bit_compute_dtypebfloat16
bnb_4bit_quant_storageuint8
bnb_4bit_quant_typenf4
bnb_4bit_use_double_quantFalse
load_in_4bitTrue
load_in_8bitFalse
quant_methodbitsandbytes

Training Data

The model was fine-tuned on a custom dataset (data.jsonl) consisting of:

  • Software engineering Q&A pairs
  • Code examples (Python, SQL, Docker, ML pipelines)
  • Developer chat-style dialogues
  • AI agent reasoning snippets

Intended Uses

  • Software development assistance
  • Generating code snippets or debugging suggestions
  • Explaining AI/ML or MLOps concepts
  • General programming conversations

Limitations

  • May produce hallucinated code or incorrect syntax.
  • Not tested on safety-critical or financial decision-making tasks.
  • Limited coverage outside software/AI domain.

Example Usage

python
from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig
import torch

model_id = "techpro-saida/msci_software_engineering_slm_v1"

# 4-bit config for efficient inference
bnb_config = BitsAndBytesConfig(
    load_in_4bit=True,
    bnb_4bit_compute_dtype=torch.bfloat16,
    bnb_4bit_quant_type="nf4",
)

tokenizer = AutoTokenizer.from_pretrained(model_id)

model = AutoModelForCausalLM.from_pretrained(
    model_id,
    quantization_config=bnb_config,
    device_map="auto",  # automatically balances between GPU/CPU
)

prompt = "Explain SOLID principles in OOP?"
inputs = tokenizer(prompt, return_tensors="pt").to("cuda")

outputs = model.generate(**inputs, max_new_tokens=100, temperature=0.7, top_p=0.9)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))


##### if you on LOW RAM or CPU
from transformers import AutoModelForCausalLM, AutoTokenizer

model_id = "techpro-saida/msci_software_engineering_slm_v1"

tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, device_map="cpu")

prompt = "Explain SOLID principles in OOP?"
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=60, temperature=0.7)

print(tokenizer.decode(outputs[0], skip_special_tokens=True))

Developer

  • Developed by: SAIDA D
  • Model type: SLM
  • Language(s) (NLP): ['en']
  • License: apache-2.0
  • **Finetuned from model : mistralai/Mistral-7B-v0.1`