Update README.md
Browse files
README.md
CHANGED
|
@@ -3,60 +3,49 @@ library_name: transformers
|
|
| 3 |
license: apache-2.0
|
| 4 |
datasets:
|
| 5 |
- TokenBender/code_instructions_122k_alpaca_style
|
|
|
|
| 6 |
metrics:
|
| 7 |
- accuracy
|
| 8 |
language:
|
| 9 |
- en
|
| 10 |
widget:
|
| 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 |
-
model.add(Dense(64))
|
| 49 |
-
model.add(Activation('relu'))
|
| 50 |
-
model.add(Dropout(0.5))
|
| 51 |
-
model.add(Dense(10))
|
| 52 |
-
model.add(Activation('softmax'))
|
| 53 |
-
|
| 54 |
-
# Compile the model
|
| 55 |
-
model.compile(loss='categorical_crossentropy', optimizer=Adam(), metrics=['accuracy'])
|
| 56 |
-
|
| 57 |
-
# Train the model
|
| 58 |
-
model.fit(X_train, y_train, batch_size=32, epochs=10, validation_split=0.2)
|
| 59 |
-
|
| 60 |
pipeline_tag: text-generation
|
| 61 |
base_model: codellama/CodeLlama-13b-Instruct-hf
|
| 62 |
---
|
|
|
|
| 3 |
license: apache-2.0
|
| 4 |
datasets:
|
| 5 |
- TokenBender/code_instructions_122k_alpaca_style
|
| 6 |
+
- nickrosh/Evol-Instruct-Code-80k-v1
|
| 7 |
metrics:
|
| 8 |
- accuracy
|
| 9 |
language:
|
| 10 |
- en
|
| 11 |
widget:
|
| 12 |
+
- text: |
|
| 13 |
+
### Instruction: write a neural network complete code in Keras
|
| 14 |
+
### Input: Use cifar dataset
|
| 15 |
+
### Response:
|
| 16 |
+
output:
|
| 17 |
+
text: >-
|
| 18 |
+
from keras.datasets import cifar10 import numpy as np from keras.models
|
| 19 |
+
import Sequential from keras.layers import Dense, Dropout, Activation,
|
| 20 |
+
Flatten from keras.layers import Conv2D, MaxPooling2D from keras.utils
|
| 21 |
+
import to_categorical from keras.optimizers import Adam
|
| 22 |
+
|
| 23 |
+
# Load the CIFAR-10 dataset (X_train, y_train), (X_test, y_test) =
|
| 24 |
+
cifar10.load_data()
|
| 25 |
+
|
| 26 |
+
# Normalize pixel values to be between 0 and 1 X_train =
|
| 27 |
+
X_train.astype('float32') / 255 X_test = X_test.astype('float32') / 255
|
| 28 |
+
|
| 29 |
+
# Convert class vectors to binary class matrices y_train =
|
| 30 |
+
to_categorical(y_train, num_classes=10) y_test = to_categorical(y_test,
|
| 31 |
+
num_classes=10)
|
| 32 |
+
|
| 33 |
+
# Create the model model = Sequential() model.add(Conv2D(32, (3, 3),
|
| 34 |
+
input_shape=(32, 32, 3))) model.add(Activation('relu'))
|
| 35 |
+
model.add(MaxPooling2D(pool_size=(2, 2)))
|
| 36 |
+
|
| 37 |
+
model.add(Conv2D(64, (3, 3))) model.add(Activation('relu'))
|
| 38 |
+
model.add(MaxPooling2D(pool_size=(2, 2)))
|
| 39 |
+
|
| 40 |
+
model.add(Flatten()) model.add(Dense(64)) model.add(Activation('relu'))
|
| 41 |
+
model.add(Dropout(0.5)) model.add(Dense(10))
|
| 42 |
+
model.add(Activation('softmax'))
|
| 43 |
+
|
| 44 |
+
# Compile the model model.compile(loss='categorical_crossentropy',
|
| 45 |
+
optimizer=Adam(), metrics=['accuracy'])
|
| 46 |
+
|
| 47 |
+
# Train the model model.fit(X_train, y_train, batch_size=32, epochs=10,
|
| 48 |
+
validation_split=0.2)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 49 |
pipeline_tag: text-generation
|
| 50 |
base_model: codellama/CodeLlama-13b-Instruct-hf
|
| 51 |
---
|