<jupyter_start><jupyter_text>Clone the project code from github repo<jupyter_code>!git clone https://github.com/BatyrM/QL-Net.git
!python QL-Net/train_baseline_CIFAR10.py<jupyter_output>[1;30;43mStreaming output truncated to the last 5000 lines.[0m
Train Epoch: 84 [48640/50000 (97%)]	Loss: 0.147471	Accuracy: 96.00
----- Validation ----------
Accuracy of the network on the 10000 test images: 87.96 %
---------------------------
Train Epoch: 85 [0/50000 (0%)]	Loss: 0.118763	Accuracy: 96.00
Train Epoch: 85 [2560/50000 (5%)]	Loss: 0.068298	Accuracy: 96.00
Train Epoch: 85 [5120/50000 (10%)]	Loss: 0.086261	Accuracy: 96.00
Train Epoch: 85 [7680/50000 (15%)]	Loss: 0.137664	Accuracy: 95.00
Train Epoch: 85 [10240/50000 (20%)]	Loss: 0.077230	Accuracy: 97.00
Train Epoch: 85 [12800/50000 (26%)]	Loss: 0.109362	Accuracy: 95.00
Train Epoch: 85 [15360/50000 (31%)]	Loss: 0.192164	Accuracy: 96.00
Train Epoch: 85 [17920/50000 (36%)]	Loss: 0.063735	Accuracy: 98.00
Train Epoch: 85 [20480/50000 (41%)]	Loss: 0.097212	Accuracy: 96.00
Train Epoch: 85 [23040/50000 (46%)]	Loss: 0.094474	Accuracy: 95.00
Train Epoch: 85 [25600/50000 (51%)]	Loss: 0.111546	Accuracy: 96.00
Train Epoch: 85 [28160/500[...]<jupyter_text>Train baseline model Construct look-up table for approximation --> Based on case you want to implement write the case_number as the argument for the parser. case_number >= 4 means you want to construct dictionary for input layer also.Case number = 1: Implement quantization for layer 1 onlyCase number = 2: Implement quantization for layer 2 onlyCase number = 3: Implement quantization for both layer 1 and 2Case number = 4: Implement quantization for input layer onlyCase number = 5: Implement quantization for input layer + layer 1Case number = 6: Implement quantization for input layer + layer 2Case number = 7: Implement quantization for input layer + layer 1 + layer 2<jupyter_code>!python QL-Net/construct_dict_CIFAR10.py --case_number 5<jupyter_output>Files already downloaded and verified
Load activations
Dimention of data (5, 128, 64, 16, 16)
Construct tree 1
Node id 0 Density: 396
Node id 1 Density: 95
Node id 2 Density: 28
Node id 3 Density: 778
Node id 4 Density: 104
Node id 5 Density: 105
Node id 6 Density: 692
Node id 7 Density: 99
Node id 8 Density: 79
Node id 9 Density: 184<jupyter_text>You have 7 different cases for different layers quantization. In order to train quantized model you MUST PROVIDE case number as a parsing argument so that program will know what you want to implement.These are the 7 possible cases:Case number = 1: Implement quantization for layer 1 onlyCase number = 2: Implement quantization for layer 2 onlyCase number = 3: Implement quantization for both layer 1 and 2Case number = 4: Implement quantization for input layer onlyCase number = 5: Implement quantization for input layer + layer 1Case number = 6: Implement quantization for input layer + layer 2Case number = 7: Implement quantization for input layer + layer 1 + layer 2<jupyter_code>!python QL-Net/train_quantized_CIFAR10.py --case_number 1
!python QL-Net/train_quantized_CIFAR10.py --case_number 4
!python QL-Net/train_quantized_CIFAR10.py --case_number 5<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.09809434551702594, 'fraction_numerical': 0.12933458294283037, 'mean_word_length': 4.617543859649123, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 13, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '231118', 'license': 'MIT', 'n_tokens_mistral': 1379, 'n_tokens_neox': 1032, 'n_words': 421, 'path': 'QLNet_by_closest_to_centroids_clustering_CIFAR10.ipynb', 'repo_name': 'BatyrM/QL-Net', 'size': '3201'}