Gemma-4-12B TypeScript

This model is a specialized, fine-tuned version of Google's Gemma-4 12B designed specifically for TypeScript code generation, refactoring, and instruction. It was fine-tuned efficiently using the Unsloth library by [spaceoutpl].

๐Ÿ’ป Model Details

  • Base Model: google/gemma-4-12B
  • License: MIT
  • Language: English / TypeScript
  • Fine-tuning Framework: Unsloth
  • Dataset: mhhmm/typescript-instruct-20k

๐Ÿš€ Intended Use

This model is ideal for developers and researchers looking for an AI assistant heavily specialized in the TypeScript ecosystem. Use cases include:

  • Code Generation: Writing complex TypeScript functions, interfaces, and types.
  • Code Refactoring: Converting standard JavaScript to strictly-typed TypeScript.
  • Instruction & Explanation: Explaining TypeScript errors, generics, utility types, and best practices.

๐Ÿ› ๏ธ Getting Started

You can load this model directly using the transformers library. Since it was trained with Unsloth, you can also utilize Unsloth's optimized inference engines for faster generation.

Installation

pip install transformers torch accelerate

Usage (Hugging Face Transformers)

from transformers import AutoTokenizer, AutoModelForCausalLM
import torch

model_id = "spaceoutpl/gemma-4-12B-typescript" # Update with your actual repo name

tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
    model_id,
    device_map="auto",
    torch_dtype=torch.bfloat16
)

prompt = "Write a generic TypeScript function to fetch and strictly type data from an API."
inputs = tokenizer(prompt, return_tensors="pt").to("cuda")

outputs = model.generate(**inputs, max_new_tokens=256)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))

๐Ÿ“Š Training Data

The model was fine-tuned on the mhhmm/typescript-instruct-20k dataset, which contains 20,000 high-quality instructional pairs focusing on TypeScript programming concepts, syntax, and problem-solving.

โš ๏ธ Limitations & Biases

  • Hallucinations: Like all LLMs, the model may occasionally generate plausible-looking but syntactically incorrect or non-compiling TypeScript code. Always test generated code in your environment.
  • Knowledge Cutoff: The model's knowledge is limited to the training data of the base Gemma-4 model and the specific TypeScript dataset used for fine-tuning. It may not reflect the absolute latest TypeScript beta features.
Downloads last month
-
GGUF
Model size
12B params
Architecture
gemma4
Hardware compatibility
Log In to add your hardware

4-bit

5-bit

6-bit

8-bit

16-bit

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

Model tree for MassivDash/Gemma-4-tyepscript-coder-12b

Adapter
(5)
this model

Dataset used to train MassivDash/Gemma-4-tyepscript-coder-12b