Downloads · 30 days
4.8K
23% of all-time downloads
teknovizier/minilm-tekla-attr-embed-v1
minilm-tekla-attr-embed-v1 is a sentence similarity model from teknovizier. Use it when you need a score for how close two texts are. It is set up for sentence-transformers. The card lists the license as gpl-3.0.
This is a sentence-transformers model finetuned from sentence-transformers/all-MiniLM-L12-v2 for matching Tekla Structures attributes with natural language queries. It enables semantic search and attribute matching by…
Downloads · 30 days
4.8K
23% of all-time downloads
All-time downloads
21K
Public
Parameters
33.4M
133 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors133 MB · 99%
From the Hugging Face model README
This is a sentence-transformers model finetuned from sentence-transformers/all-MiniLM-L12-v2 for matching Tekla Structures attributes with natural language queries. It enables semantic search and attribute matching by mapping natural language descriptions to Tekla attribute names.
This model is specifically designed for Tekla Structures attribute matching. It converts natural language queries (e.g., "bolt name from catalog") into embeddings that can be matched against Tekla attribute names (e.g., "BOLT_FULL_NAME").
First install the Sentence Transformers library:
pip install -U sentence-transformers
Then you can load this model and run inference.
# Example: Tekla Attribute Matching
from sentence_transformers import SentenceTransformer, util
# Load the model
model = SentenceTransformer("teknovizier/minilm-tekla-attr-embed-v1")
# Tekla attributes to match against
attributes = ["TOP_LEVEL", "PRODUCT_NAME", "POUR_PHASE", "BOLT_FULL_NAME"]
# User queries (natural language)
queries = ["object top level", "product name", "pour phase", "bolt name from catalog"]
# Get embeddings
attr_embeddings = model.encode(attributes)
query_embeddings = model.encode(queries)
# Calculate similarities and find best matches
similarities = util.cos_sim(query_embeddings, attr_embeddings)
for i, query in enumerate(queries):
best_match_idx = similarities[i].argmax().item()
print(f"'{query}' → '{attributes[best_match_idx]}' (score: {similarities[i][best_match_idx]:.3f})")
# Output:
# 'object top level' → 'TOP_LEVEL' (score: 0.822)
# 'product name' → 'PRODUCT_NAME' (score: 0.879)
# 'pour phase' → 'POUR_PHASE' (score: 0.953)
# 'bolt name from catalog' → 'BOLT_FULL_NAME' (score: 0.670)
For optimal performance, text should be normalized before encoding:
Example: "BOLT_NAME_FROM_CATALOG" → "bolt name from catalog"
The model is trained on normalized text, so applying this normalization to both queries and attribute names will yield the best matching results.
This model is trained on synthetically generated data created using Claude Opus. While the synthetic data generation process includes quality filtering and validation, the model's performance on real-world user queries may differ from its performance on synthetic training examples.
The model is specifically fine-tuned for Tekla Structures attribute matching and may not generalize well to:
Optimal performance requires consistent text normalization (lowercasing, underscore/hyphen replacement). Queries that don't follow this normalization pattern may yield suboptimal matches.
| query | attribute |
|---|---|
| <code>bolt name from catalog</code> | <code>BOLT_FULL_NAME</code> |
| <code>pour phase</code> | <code>POUR_PHASE</code> |
| <code>object top level</code> | <code>TOP_LEVEL</code> |
| <code>weld cross section area above line</code> | <code>WELD_CROSSSECTION_AREA1</code> |
{
"scale": 20.0,
"similarity_fct": "cos_sim",
"gather_across_devices": false
}
per_device_train_batch_size: 64per_device_eval_batch_size: 64multi_dataset_batch_sampler: round_robin| Epoch | Step | Training Loss |
|---|---|---|
| 0.8977 | 500 | 0.3418 |
| 1.7953 | 1000 | 0.1363 |
| 2.6930 | 1500 | 0.0981 |
@inproceedings{reimers-2019-sentence-bert,
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
author = "Reimers, Nils and Gurevych, Iryna",
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
month = "11",
year = "2019",
publisher = "Association for Computational Linguistics",
url = "https://arxiv.org/abs/1908.10084",
}
@misc{henderson2017efficient,
title={Efficient Natural Language Response Suggestion for Smart Reply},
author={Matthew Henderson and Rami Al-Rfou and Brian Strope and Yun-hsuan Sung and Laszlo Lukacs and Ruiqi Guo and Sanjiv Kumar and Balint Miklos and Ray Kurzweil},
year={2017},
eprint={1705.00652},
archivePrefix={arXiv},
primaryClass={cs.CL}
}