Run this model with HF Jobs

Run sylvester-francis/typescript-slm-7b on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs to fine-tune https://huggingface.co/sylvester-francis/typescript-slm-7b. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/sylvester-francis/typescript-slm-7b on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

Evaluate on a benchmark

Use HF Jobs to evaluate https://huggingface.co/sylvester-francis/typescript-slm-7b. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.

Quantize for lower memory use

Use HF Jobs to create a 4-bit version of https://huggingface.co/sylvester-francis/typescript-slm-7b. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.

TypeScript SLM 7B

Standard 7B TypeScript model for TypeScript code generation, optimized for React, Next.js, Angular, and Node.js.

Model Details

  • Base Model: Qwen/Qwen2.5-Coder-7B-Instruct
  • Model Size: 7B parameters
  • Training Method: LoRA (Low-Rank Adaptation)
  • Context Length: 2048 tokens
  • LoRA Rank: 64
  • Training Dataset: 5,000 high-quality TypeScript samples

Training Configuration

  • Batch Size: 2
  • Gradient Accumulation: 16
  • Effective Batch Size: 32
  • Learning Rate: 0.0001
  • Epochs: 3
  • Hardware: Google Colab A100 40GB

Usage

from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import PeftModel

base_model = "Qwen/Qwen2.5-Coder-7B-Instruct"
model = AutoModelForCausalLM.from_pretrained(
    base_model,
    device_map="auto",
    torch_dtype="auto"
)
tokenizer = AutoTokenizer.from_pretrained(base_model)

# Load LoRA adapter
model = PeftModel.from_pretrained(model, "sylvester-francis/typescript-slm-7b")

# Generate code
prompt = "Write a React component with TypeScript:"
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=512)
print(tokenizer.decode(outputs[0]))

Repository

https://github.com/sylvester-francis/slm-typescript-model

Downloads last month
15
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for sylvester-francis/typescript-slm-7b

Base model

Qwen/Qwen2.5-7B
Adapter
(696)
this model