Text Generation
Transformers
Safetensors
English
llama
conversational
Inference Endpoints
text-generation-inference
lucifertrj commited on
Commit
288d997
1 Parent(s): 66442b3

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +38 -49
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
- - text: |
12
- ### Instruction: write a neural network complete code in Keras
13
- ### Input: Use cifar dataset
14
- ### Response:
15
-
16
- output:
17
- text: >-
18
- from keras.datasets import cifar10
19
- import numpy as np
20
- from keras.models import Sequential
21
- from keras.layers import Dense, Dropout, Activation, Flatten
22
- from keras.layers import Conv2D, MaxPooling2D
23
- from keras.utils import to_categorical
24
- from keras.optimizers import Adam
25
-
26
- # Load the CIFAR-10 dataset
27
- (X_train, y_train), (X_test, y_test) = cifar10.load_data()
28
-
29
- # Normalize pixel values to be between 0 and 1
30
- X_train = X_train.astype('float32') / 255
31
- X_test = X_test.astype('float32') / 255
32
-
33
- # Convert class vectors to binary class matrices
34
- y_train = to_categorical(y_train, num_classes=10)
35
- y_test = to_categorical(y_test, num_classes=10)
36
-
37
- # Create the model
38
- model = Sequential()
39
- model.add(Conv2D(32, (3, 3), input_shape=(32, 32, 3)))
40
- model.add(Activation('relu'))
41
- model.add(MaxPooling2D(pool_size=(2, 2)))
42
-
43
- model.add(Conv2D(64, (3, 3)))
44
- model.add(Activation('relu'))
45
- model.add(MaxPooling2D(pool_size=(2, 2)))
46
-
47
- model.add(Flatten())
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
  ---