File size: 2,798 Bytes
9d0548b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
79a76ae
 
9d0548b
f345803
9d0548b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
79a76ae
 
e8e5abe
 
79a76ae
 
e8e5abe
 
 
 
 
2db7ab7
e8e5abe
979c54b
 
 
e8e5abe
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
79a76ae
 
33a0fe4
79a76ae
33a0fe4
 
 
 
 
 
 
 
 
 
 
 
 
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
---
license: cc-by-nc-4.0
datasets:
- nickrosh/Evol-Instruct-Code-80k-v1
- MBZUAI/LaMini-instruction
language:
- en
base_model:
- Bertug1911/BrtGPT-1-Pre
pipeline_tag: text-generation
tags:
- code
---

# BrtGPT-1-Pre-Code

## Model Summary

We're introducing "BratGPT-1-Pre-Code"! Our model was retrained using the "BrtGPT-1-Pre" model, which was already pre-trained, using code data.

Compared to the BrtGPT-1-Pre model, it can write much better code, even with typos.

No change was observed in general/daily chat and simple knowledge-based question-and-answer capabilities.

It may produce some harmful output.

## Difference Between Models

Examples:

| Prompt | BrtGPT-1-Pre |
| :------------: | :------------: |
| "Write me a code that prints "Hello World". | "Here's a code that prints "Hello World" in a list of words:```for i in range(1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5," |
| "Write me a code that generates random number."| def random(1): return random(1)|


BrtGPT-1-Pre-Code's answers:

1- "Write me a code that prints "Hello World" Code:

```
```python
def print_hello_numbers(numbers):
    if num < num:
        return num
    elif num % num % num % num % num % num % num % num % num % num % num % num % num % num % num % num % num
```

2- "Write me a code that generates random number. Code:

```
#Here is a code that generates random number in python 3:

```python
def generate_random_number(num):
    # Create a new random number between 1 and 1
    random_number = random.randint(num)
    random_number = random.randint(num)
    random_number = random.randint(num)

    # Create a new
```


## How to use?
NOTE: Model ***Supports*** Auto-model library now!
You can run this code to use (Auto-model/Hugging Face transformers):

```
from transformers import pipeline

# Pipeline
pipe = pipeline(
    "text-generation",
    model="Bertug1911/BrtGPT-1-Pre-Code",
    trust_remote_code=True,
    top_k=40,              # Good for creativity
    temperature=0.8,       # Good for creativity
    max_new_tokens=128     # Default maximum model output (Maximum 1024)
)

# Messages
messages = [
    {"role": "user", "content": "What is the capital of France?"},
]

# Take out
output = pipe(messages)

# Only write asistant's (Model output) answer
assistant_response = output[0]["generated_text"][-1]["content"].strip()
# Special token conversions
formatted_out = assistant_response.replace(" ", "").replace("Ġ", " ").replace("Ċ", "\n")

print(formatted_out)

```
## Evulation

Evulation results is cooming soon!

## Risks and biases

Model may generates:
- Illegal outputs
- Harmfull contents

Use with caution!!

## Contact

"bertug2099@gmail.com" or "bertugscpmail@gmail.com"