Sriram-214/nodejs-coder-qwen25
141
๐ nodejs-coder-qwen25
A fine-tuned Qwen2.5-Coder-7B-Instruct model specialized for Node.js backend development, trained with LoRA adapters using Unsloth, merged into a single GGUF file for efficient local inference with Ollama.
๐ง Model Description
This model is specifically trained to write clean, production-ready Node.js backend code. It understands common backend patterns including REST APIs, database integrations, authentication, and testing.
๐ฏ Specialties
- โ Express.js โ REST APIs, middleware, routing
- โ NestJS โ modules, controllers, services, guards
- โ Sequelize / Prisma โ ORM models, migrations, queries
- โ MongoDB / Mongoose โ schemas, models, aggregations
- โ PostgreSQL / pg โ raw queries, connection pooling
- โ JWT Authentication โ login, token generation, guards
- โ Jest โ unit tests, mocking, integration tests
- โ Async/Await โ file I/O, error handling, promises
โก Quick Start with Ollama
Step 1 โ Download files
hf download Sriram-214/nodejs-coder-qwen25 nodejs-coder-Q4_K_M.gguf --local-dir ./
hf download Sriram-214/nodejs-coder-qwen25 Modelfile --local-dir ./Step 2 โ Create Ollama model
ollama create nodejs-coder -f ModelfileStep 3 โ Run
ollama run nodejs-coder๐ Modelfile
FROM ./nodejs-coder-Q4_K_M.gguf
PARAMETER temperature 0.7
PARAMETER top_p 0.9
PARAMETER repeat_penalty 1.1
PARAMETER num_ctx 2048
PARAMETER num_gpu 0
PARAMETER stop "<|im_end|>"
PARAMETER stop "<|im_start|>"
TEMPLATE """<|im_start|>system
{{ .System }}<|im_end|>
<|im_start|>user
{{ .Prompt }}<|im_end|>
<|im_start|>assistant
"""
SYSTEM """You are a Node.js backend development expert. You write clean, efficient, production-ready code following best practices. You specialize in Express.js, NestJS, Sequelize, Prisma, MongoDB, PostgreSQL, and Jest testing. Always include error handling and follow RESTful API design principles."""Note: Set num_gpu 0 for CPU-only mode on GPUs with โค6GB VRAM. For GPUs with more VRAM, increase this value.๐ฌ Example Prompts & Outputs
Express REST API
Prompt: Write a simple Express.js REST API with a GET /health endpoint
const express = require('express');
const app = express();
app.get('/health', (req, res) => {
res.status(200).json({ status: 'ok' });
});
app.listen(3000, () => console.log('Server running on port 3000'));Async File Reading
Prompt: Write a Node.js function that reads a JSON file using async/await
const fs = require('fs').promises;
async function readJsonFile(filePath) {
try {
const data = await fs.readFile(filePath, 'utf-8');
return JSON.parse(data);
} catch (error) {
throw new Error(`Failed to read file: ${error.message}`);
}
}List Directory Files
Prompt: Write a simple Node.js code to list all the files in a directory
const fs = require('fs');
fs.readdir('./', (err, files) => {
if (err) throw err;
console.log(files);
});๐๏ธ Training Details
โ ๏ธ Limitations
- Optimized for Node.js/JavaScript โ not suited for other languages
- Context window of 2048 tokens โ long files may be truncated
- CPU inference is slow (~3-5 tokens/sec on modern CPUs)
- May occasionally produce outdated library syntax
๐ License
Apache 2.0 โ see LICENSE
