Views
No views yet
TripletLoss з margin = 0.4fix_mistral_regex=True через особливості токенізатора BGE-M3.1from sentence_transformers import SentenceTransformer
2
3# Завантаження моделі
4model = SentenceTransformer(
5 "uaritm/bge-m3-cardio-ua",
6 model_kwargs={"fix_mistral_regex": True}
7)
8
9# Ваші тексти
10queries = ["Скарги на стискаючий біль за грудиною, ЕКГ: елевація ST."]
11documents = [
12 "Протокол лікування гострого інфаркту міокарда: негайне стентування.",
13 "Лікування гастриту та печії: дієта та антациди."
14]
15
16# Генерація ембеддінгів
17query_emb = model.encode(queries)
18doc_embs = model.encode(documents)
19
20# Пошук схожості
21from sentence_transformers import util
22hits = util.semantic_search(query_emb, doc_embs, top_k=1)
23print(hits)
24
25### 4. Limitations
26
27- Optimized for cardiology and cardiac surgery
28- Reduced accuracy outside these domains
29- No vision capabilities (text-only MedGemma IT)
30- May generate incomplete or generalized recommendations
31
32---
33
34### 5. Citing & Authors
35If you use this model in your research, please cite:
36
37@misc{Ostashko2025MedGemmaCardiology,
38 title = {MedGemma-4B-Cardiology: A Domain-Finetuned Clinical LLM for Cardiology},
39 author = {Uaritm},
40 year = {2025},
41 url = {ai.esemi.org}
42}
43
44Project homepage: https://ai.esemi.org
45
46LicenseThe use of this model is subject to the terms of the original Gemma License. Please review and adhere to the associated licensing terms for the base model.