Upload folder using huggingface_hub
Browse filesFiles changed (9)
- Multi_algoritham_classifier_training_report.jsonAdded+53
- README.mdAdded+24
- codebert_model.ptAdded+3
- metadata.jsonAdded+16
- tokenizer/merges.txtAdded
- tokenizer/special_tokens_map.jsonAdded+51
- tokenizer/tokenizer_config.jsonAdded+56
- tokenizer/vocab.jsonAdded
- training_report.jsonAdded+53
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253{
"training_completed": "2026-03-09T17:54:51.142176",
"hyperparameters": {
"epochs": 15,
"batch_size": 8,
"learning_rate": 2e-05,
"max_length": 512,
"threshold": 0.5
},
"dataset": {
"total_samples": 2400,
"train_samples": 1650,
"test_samples": 750,
"algorithms": [
"bernstein_vazirani",
"deutsch_jozsa",
"grover",
"qaoa",
"qft",
"qpe",
"shor",
"simon"
],
"label_distribution": {
"bernstein_vazirani": 600,
"deutsch_jozsa": 300,
"grover": 450,
"qaoa": 150,
"qft": 300,
"qpe": 150,
"shor": 150,
"simon": 300
}
},
"best_metrics": {
"epoch": 14,
"hamming_loss": 0.1515,
"exact_match": 0.4,
"f1_micro": 0.3976143141153082,
"f1_macro": 0.6634888548951049,
"f1_weighted": 0.3446328671328671,
"f1_per_algorithm": {
"bernstein_vazirani": 0.0,
"deutsch_jozsa": 0.0,
"grover": 1.0,
"qaoa": 1.0,
"qft": 0.8391608391608392,
"qpe": 1.0,
"shor": 1.0,
"simon": 0.46875
}
}
}123456789101112131415161718192021222324# Nexar Quantum Algorithm Classifier
CodeBERT-based classifier for identifying quantum algorithms in source code.
## Supported Algorithms
- Bernstein-Vazirani
- Deutsch-Jozsa
- Grover's Algorithm
- QAOA (Quantum Approximate Optimization Algorithm)
- QFT (Quantum Fourier Transform)
- QPE (Quantum Phase Estimation)
- Shor's Algorithm
- Simon's Algorithm
## Usage
```python
from transformers import AutoTokenizer, AutoModel
import torch
tokenizer = AutoTokenizer.from_pretrained("yashodhajayasinghe/nexar-quantum-algorithm-classifier")
model = AutoModel.from_pretrained("yashodhajayasinghe/nexar-quantum-algorithm-classifier")
```123version https://git-lfs.github.com/spec/v1oid sha256:8a741b72fc32202f8eb07b885799caf4b25829db2015fa8f413ba45a6c95734csize 49868949412345678910111213141516{
"algorithms": [
"bernstein_vazirani",
"deutsch_jozsa",
"grover",
"qaoa",
"qft",
"qpe",
"shor",
"simon"
],
"max_length": 512,
"threshold": 0.5,
"num_labels": 8,
"device": "cpu"
}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051{
"bos_token": {
"content": "<s>",
"lstrip": false,
"normalized": true,
"rstrip": false,
"single_word": false
},
"cls_token": {
"content": "<s>",
"lstrip": false,
"normalized": true,
"rstrip": false,
"single_word": false
},
"eos_token": {
"content": "</s>",
"lstrip": false,
"normalized": true,
"rstrip": false,
"single_word": false
},
"mask_token": {
"content": "<mask>",
"lstrip": true,
"normalized": false,
"rstrip": false,
"single_word": false
},
"pad_token": {
"content": "<pad>",
"lstrip": false,
"normalized": true,
"rstrip": false,
"single_word": false
},
"sep_token": {
"content": "</s>",
"lstrip": false,
"normalized": true,
"rstrip": false,
"single_word": false
},
"unk_token": {
"content": "<unk>",
"lstrip": false,
"normalized": true,
"rstrip": false,
"single_word": false
}
}1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556{
"add_prefix_space": false,
"added_tokens_decoder": {
"0": {
"content": "<s>",
"lstrip": false,
"normalized": true,
"rstrip": false,
"single_word": false,
"special": true
},
"1": {
"content": "<pad>",
"lstrip": false,
"normalized": true,
"rstrip": false,
"single_word": false,
"special": true
},
"2": {
"content": "</s>",
"lstrip": false,
"normalized": true,
"rstrip": false,
"single_word": false,
"special": true
},
"3": {
"content": "<unk>",
"lstrip": false,
"normalized": true,
"rstrip": false,
"single_word": false,
"special": true
},
"50264": {
"content": "<mask>",
"lstrip": true,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
}
},
"bos_token": "<s>",
"clean_up_tokenization_spaces": true,
"cls_token": "<s>",
"eos_token": "</s>",
"errors": "replace",
"mask_token": "<mask>",
"model_max_length": 512,
"pad_token": "<pad>",
"sep_token": "</s>",
"tokenizer_class": "RobertaTokenizer",
"unk_token": "<unk>"
}1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253{
"training_completed": "2026-03-09T17:54:51.142176",
"hyperparameters": {
"epochs": 15,
"batch_size": 8,
"learning_rate": 2e-05,
"max_length": 512,
"threshold": 0.5
},
"dataset": {
"total_samples": 2400,
"train_samples": 1650,
"test_samples": 750,
"algorithms": [
"bernstein_vazirani",
"deutsch_jozsa",
"grover",
"qaoa",
"qft",
"qpe",
"shor",
"simon"
],
"label_distribution": {
"bernstein_vazirani": 600,
"deutsch_jozsa": 300,
"grover": 450,
"qaoa": 150,
"qft": 300,
"qpe": 150,
"shor": 150,
"simon": 300
}
},
"best_metrics": {
"epoch": 14,
"hamming_loss": 0.1515,
"exact_match": 0.4,
"f1_micro": 0.3976143141153082,
"f1_macro": 0.6634888548951049,
"f1_weighted": 0.3446328671328671,
"f1_per_algorithm": {
"bernstein_vazirani": 0.0,
"deutsch_jozsa": 0.0,
"grover": 1.0,
"qaoa": 1.0,
"qft": 0.8391608391608392,
"qpe": 1.0,
"shor": 1.0,
"simon": 0.46875
}
}
}Multi_algoritham_classifier_training_report.jsonAdded+53
README.mdAdded+24
codebert_model.ptAdded+3
metadata.jsonAdded+16
tokenizer/merges.txtAdded
tokenizer/special_tokens_map.jsonAdded+51
tokenizer/tokenizer_config.jsonAdded+56
tokenizer/vocab.jsonAdded
training_report.jsonAdded+53