TUSGPT-TR-Medical-9B
214
1
license:apache-2.0
by
turkerberkdonmez
Language Model
OTHER
9B params
New
214 downloads
Early-stage
Edge AI:
Mobile
Laptop
Server
21GB+ RAM
Mobile
Laptop
Server
Quick Summary
AI model with specialized capabilities.
Device Compatibility
Mobile
4-6GB RAM
Laptop
16GB RAM
Server
GPU
Minimum Recommended
9GB+ RAM
Code Examples
pythontransformers
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model_id = "turkerberkdonmez/TUSGPT-TR-Medical-9B"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.bfloat16,
device_map="auto",
)
messages = [
{"role": "system", "content": "Sen tıp alanında uzmanlaşmış, Türkçe yanıt veren bir yapay zeka asistanısın. Soruları doğru, kapsamlı ve anlaşılır biçimde yanıtla."},
{"role": "user", "content": "Akut miyokard enfarktüsünün erken belirtileri nelerdir?"},
]
prompt = tokenizer.apply_chat_template(messages, add_generation_prompt=True, tokenize=False)
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(
**inputs,
max_new_tokens=512, # complex tasks için artırılabilir
temperature=0.6,
top_p=0.95,
top_k=20,
# min_p Transformers'ta her zaman desteklenmeyebilir; model config'ine bağlıdır.
# Aşağıdakiler opsiyonel: tekrarları azaltmak için
# repetition_penalty=1.15,
# presence_penalty=0.3,
do_sample=True, # greedy decoding kapalı
)
print(tokenizer.decode(outputs[0][inputs.input_ids.shape[1]:], skip_special_tokens=True))Deploy This Model
Production-ready deployment in minutes
Together.ai
Instant API access to this model
Production-ready inference API. Start free, scale to millions.
Try Free APIReplicate
One-click model deployment
Run models in the cloud with simple API. No DevOps required.
Deploy NowDisclosure: We may earn a commission from these partners. This helps keep LLMYourWay free.