File size: 948 Bytes
d71d68a
 
 
 
 
 
 
 
 
 
 
18c7145
d71d68a
18c7145
d71d68a
 
 
6fc8a82
 
 
 
 
 
 
 
 
 
 
 
ab7c22b
 
 
12dd83c
ab7c22b
 
 
 
12dd83c
 
6fc8a82
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
---
license: mit
language:
- en
tags:
- code
- moe
- react
- tailwind
library_name: pytorch
---

# Neurocoder

From-scratch narrow-domain coding SLM for React + Tailwind generation and unified-diff edits.

Includes trained `model.safetensors` weights.

## Transformers Usage

```python
from transformers import AutoTokenizer, AutoModelForCausalLM

model_id = "Sharjeelbaig/neurocoder"
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(model_id, trust_remote_code=True)

prompt = "Generate a landing page for marketing agency titled Velocity Landing"
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(
    **inputs,
    max_new_tokens=220,
    do_sample=False,
    repetition_penalty=1.22,
    no_repeat_ngram_size=6,
    use_cache=True,
)
text = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(text.split("\nAssistant:", 1)[-1].strip())
```