MassivDash commited on
Commit
669a1ed
·
verified ·
1 Parent(s): 079b794

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +76 -0
README.md CHANGED
@@ -1,3 +1,79 @@
1
  ---
2
  license: mit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: mit
3
+ datasets:
4
+ - mhhmm/typescript-instruct-20k
5
+ base_model:
6
+ - google/gemma-4-12B
7
+ tags:
8
+ - typescript
9
+ - finetuned
10
+ - spaceoutpl
11
+ - unsloth
12
+ - code
13
+ - text-generation
14
+ - instruct
15
+ - programming
16
+ - gemma
17
+ - lora
18
+ - javascript
19
  ---
20
+
21
+ # Gemma-4-12B TypeScript
22
+
23
+ This model is a specialized, fine-tuned version of [Google's Gemma-4 12B](https://huggingface.co/google/gemma-4-12B) designed specifically for TypeScript code generation, refactoring, and instruction. It was fine-tuned efficiently using the [Unsloth](https://github.com/unslothai/unsloth) library by [spaceoutpl].
24
+
25
+ ## 💻 Model Details
26
+
27
+ * **Base Model:** google/gemma-4-12B
28
+ * **License:** MIT
29
+ * **Language:** English / TypeScript
30
+ * **Fine-tuning Framework:** Unsloth
31
+ * **Dataset:** [mhhmm/typescript-instruct-20k](https://huggingface.co/datasets/mhhmm/typescript-instruct-20k)
32
+
33
+ ## 🚀 Intended Use
34
+
35
+ This model is ideal for developers and researchers looking for an AI assistant heavily specialized in the TypeScript ecosystem. Use cases include:
36
+ * **Code Generation:** Writing complex TypeScript functions, interfaces, and types.
37
+ * **Code Refactoring:** Converting standard JavaScript to strictly-typed TypeScript.
38
+ * **Instruction & Explanation:** Explaining TypeScript errors, generics, utility types, and best practices.
39
+
40
+ ## 🛠️ Getting Started
41
+
42
+ 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.
43
+
44
+ ### Installation
45
+
46
+ ```bash
47
+ pip install transformers torch accelerate
48
+ ```
49
+
50
+ ### Usage (Hugging Face Transformers)
51
+
52
+ ```python
53
+ from transformers import AutoTokenizer, AutoModelForCausalLM
54
+ import torch
55
+
56
+ model_id = "spaceoutpl/gemma-4-12B-typescript" # Update with your actual repo name
57
+
58
+ tokenizer = AutoTokenizer.from_pretrained(model_id)
59
+ model = AutoModelForCausalLM.from_pretrained(
60
+ model_id,
61
+ device_map="auto",
62
+ torch_dtype=torch.bfloat16
63
+ )
64
+
65
+ prompt = "Write a generic TypeScript function to fetch and strictly type data from an API."
66
+ inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
67
+
68
+ outputs = model.generate(**inputs, max_new_tokens=256)
69
+ print(tokenizer.decode(outputs[0], skip_special_tokens=True))
70
+ ```
71
+
72
+ ## 📊 Training Data
73
+
74
+ 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.
75
+
76
+ ## ⚠️ Limitations & Biases
77
+
78
+ * **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.
79
+ * **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.