Instructions to use RedneckBOT/typescript-slm-7b-reasoning-full with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use RedneckBOT/typescript-slm-7b-reasoning-full with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="RedneckBOT/typescript-slm-7b-reasoning-full") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("RedneckBOT/typescript-slm-7b-reasoning-full") model = AutoModelForCausalLM.from_pretrained("RedneckBOT/typescript-slm-7b-reasoning-full") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - llama-cpp-python
How to use RedneckBOT/typescript-slm-7b-reasoning-full with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="RedneckBOT/typescript-slm-7b-reasoning-full", filename="gguf/typescript-slm-7b-reasoning-q4_k_m.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use RedneckBOT/typescript-slm-7b-reasoning-full with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf RedneckBOT/typescript-slm-7b-reasoning-full:Q4_K_M # Run inference directly in the terminal: llama-cli -hf RedneckBOT/typescript-slm-7b-reasoning-full:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf RedneckBOT/typescript-slm-7b-reasoning-full:Q4_K_M # Run inference directly in the terminal: llama-cli -hf RedneckBOT/typescript-slm-7b-reasoning-full:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf RedneckBOT/typescript-slm-7b-reasoning-full:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf RedneckBOT/typescript-slm-7b-reasoning-full:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf RedneckBOT/typescript-slm-7b-reasoning-full:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf RedneckBOT/typescript-slm-7b-reasoning-full:Q4_K_M
Use Docker
docker model run hf.co/RedneckBOT/typescript-slm-7b-reasoning-full:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use RedneckBOT/typescript-slm-7b-reasoning-full with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "RedneckBOT/typescript-slm-7b-reasoning-full" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "RedneckBOT/typescript-slm-7b-reasoning-full", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/RedneckBOT/typescript-slm-7b-reasoning-full:Q4_K_M
- SGLang
How to use RedneckBOT/typescript-slm-7b-reasoning-full 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 "RedneckBOT/typescript-slm-7b-reasoning-full" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "RedneckBOT/typescript-slm-7b-reasoning-full", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "RedneckBOT/typescript-slm-7b-reasoning-full" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "RedneckBOT/typescript-slm-7b-reasoning-full", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use RedneckBOT/typescript-slm-7b-reasoning-full with Ollama:
ollama run hf.co/RedneckBOT/typescript-slm-7b-reasoning-full:Q4_K_M
- Unsloth Studio new
How to use RedneckBOT/typescript-slm-7b-reasoning-full with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for RedneckBOT/typescript-slm-7b-reasoning-full to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for RedneckBOT/typescript-slm-7b-reasoning-full to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for RedneckBOT/typescript-slm-7b-reasoning-full to start chatting
- Docker Model Runner
How to use RedneckBOT/typescript-slm-7b-reasoning-full with Docker Model Runner:
docker model run hf.co/RedneckBOT/typescript-slm-7b-reasoning-full:Q4_K_M
- Lemonade
How to use RedneckBOT/typescript-slm-7b-reasoning-full with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull RedneckBOT/typescript-slm-7b-reasoning-full:Q4_K_M
Run and chat with the model
lemonade run user.typescript-slm-7b-reasoning-full-Q4_K_M
List all available models
lemonade list
TypeScript-SLM-7B-Reasoning-Full
TypeScript-SLM-7B-Reasoning is a 7B-parameter DeepSeek-based model fine-tuned for step-by-step TypeScript reasoning. It merges the base model with LoRA adapters and includes GGUF quantization for local/Ollama workflows.
This repository hosts the full merged model plus GGUF (q4_k_m) for lightweight inference.
Model Description
- Base Model: deepseek-ai/DeepSeek-R1-Distill-Qwen-7B
- Model Type: Causal LM (code reasoning)
- Parameters: 7B
- Context Length: Inherits base DeepSeek-R1-Distill-Qwen-7B window
- Fine-tuning: LoRA on TypeScript reasoning/debugging tasks
- License: MIT
- Language: English, TypeScript/JavaScript code
- System Prompt: Focus on step-by-step debugging, refactoring, and design-level explanations before giving the final typed solution.
What it is good at
- ✅ Explaining TypeScript bugs and fixes
- ✅ Refactoring and API design discussions
- ✅ Generating strongly-typed code for React/Next.js/Angular/Node.js
- ✅ Producing clear reasoning traces before final answers
Intended Uses
Primary: TypeScript reasoning, debugging, refactoring, and guided code generation.
Out-of-scope: Arbitrary natural-language chat unrelated to code; safety-sensitive or factual tasks outside TypeScript.
Prompt Examples
"Debug this TypeScript function and explain the bug step by step:\n\nfunction add(a?: number, b?: number) { return a + b; }"
"Design a typed API surface for a Next.js todo service. Explain design choices, then show the final code."
How to Use
Ollama (recommended for local)
ollama create typescript-slm-7b-reasoning -f gguf/Modelfile-q4_k_m
ollama run typescript-slm-7b-reasoning "Explain why this React hook re-renders too often..."
Transformers
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model = AutoModelForCausalLM.from_pretrained(
"sylvester-francis/typescript-slm-7b-reasoning-full",
torch_dtype=torch.float16,
device_map="auto",
)
tokenizer = AutoTokenizer.from_pretrained("sylvester-francis/typescript-slm-7b-reasoning-full")
prompt = "Refactor this TypeScript service for better typing and error handling..."
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(
**inputs,
max_new_tokens=512,
temperature=0.3,
top_p=0.95,
do_sample=True,
pad_token_id=tokenizer.eos_token_id,
)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
GGUF (llama.cpp)
huggingface-cli download sylvester-francis/typescript-slm-7b-reasoning-full \
gguf/typescript-slm-7b-reasoning-q4_k_m.gguf --local-dir ./models
./llama-cli -m ./models/gguf/typescript-slm-7b-reasoning-q4_k_m.gguf \
-p "Explain and fix this TypeScript type error..."
Model Files
gguf/typescript-slm-7b-reasoning-q4_k_m.gguf(≈4.7GB)gguf/Modelfile-q4_k_m(Ollama import)
Training Data (summary)
- Curated TypeScript code from popular GitHub repos (React, Next.js, Angular, Node.js)
- StackOverflow Q&A focused on debugging and reasoning
- Filters for strong typing, framework best practices, and reasoning-rich examples
Training Configuration (LoRA)
Base Model: deepseek-ai/DeepSeek-R1-Distill-Qwen-7B
Method: LoRA fine-tuning
Target Domains: TypeScript reasoning, debugging, refactoring
LoRA Rank / Alpha: tuned for stability and reasoning depth
Optimizer: AdamW
Max Sequence Length: inherits base model context window
Evaluation
Qualitative checks on TypeScript debugging/refactoring prompts show:
- Clear reasoning steps before final code
- Strong type usage and framework-aware patterns
- Concise, actionable fixes
Safety & Limitations
- May generate incorrect code or hallucinate APIs—review before production use.
- Not a security scanner; do not rely on it for vulnerability assessments.
- Avoid non-code or high-stakes factual tasks.
License
MIT for the fine-tuned model; base model license and dataset terms also apply.
Contact
- Maintainer: Sylvester Francis (
@sylvester-francison Hugging Face) - Issues/feedback: open a discussion on the model repo
- Downloads last month
- 248
Model tree for RedneckBOT/typescript-slm-7b-reasoning-full
Base model
deepseek-ai/DeepSeek-R1-Distill-Qwen-7B