Views
No views yet
| Task | Metric | Score |
|---|---|---|
| Citation Classification | Cosine Accuracy | 91.0% |
| Category Clustering | V‑measure (main/sub) | 63.7 / 77.2 |
| Information Retrieval | nDCG@10 | 66.3 |
1from transformers import AutoTokenizer, AutoModel
2import torch
3
4tokenizer = AutoTokenizer.from_pretrained("thellert/accphysbert")
5model = AutoModel.from_pretrained("thellert/accphysbert")
6
7text = "We report on beam instabilities observed in the LCLS-II injector."
8inputs = tokenizer(text, return_tensors="pt")
9outputs = model(**inputs)
10
11# Use mean pooling (excluding [CLS] and [SEP])
12token_embeddings = outputs.last_hidden_state[:, 1:-1, :]
13sentence_embedding = token_embeddings.mean(dim=1)1@article{Hellert_2025,
2 title = {Domain-specific text embedding model for accelerator physics},
3 author = {Hellert, Thorsten and Montenegro, João and Venturini, Marco and Pollastro, Andrea},
4 journal = {Physical Review Accelerators and Beams},
5 volume = {28},
6 number = {4},
7 pages = {044601},
8 year = {2025},
9 publisher = {American Physical Society},
10 doi = {10.1103/PhysRevAccelBeams.28.044601},
11 url = {https://doi.org/10.1103/PhysRevAccelBeams.28.044601}
12}