Text Generation
Transformers
Safetensors
Turkish
qwen3
turkish
türkçe
continued-pretraining
turkish-llm
türkçe-dil-modeli
conversational
Eval Results (legacy)
text-generation-inference
Instructions to use ecloudtech/Erk-32B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ecloudtech/Erk-32B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ecloudtech/Erk-32B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("ecloudtech/Erk-32B") model = AutoModelForCausalLM.from_pretrained("ecloudtech/Erk-32B", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ecloudtech/Erk-32B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ecloudtech/Erk-32B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ecloudtech/Erk-32B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ecloudtech/Erk-32B
- SGLang
How to use ecloudtech/Erk-32B with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "ecloudtech/Erk-32B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ecloudtech/Erk-32B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "ecloudtech/Erk-32B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ecloudtech/Erk-32B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use ecloudtech/Erk-32B with Docker Model Runner:
docker model run hf.co/ecloudtech/Erk-32B
egitim/: v2 betikleri ve veri ozetleri
Browse files- egitim/kimlik_sinavi_v2.py +39 -0
egitim/kimlik_sinavi_v2.py
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# -*- coding: utf-8 -*-
|
| 2 |
+
"""Birlesik (merged) model icin 30 soruluk kimlik sinavi — kimlik_sinavi_genis.py ile AYNI soru listesi ve olcut.
|
| 3 |
+
Kimlik sohbet sablonundaki varsayilan sistem istemiyle verilir (kullanici sistem mesaji vermez).
|
| 4 |
+
Kullanim: MID=<model dizini> BOYUT=14 OUT=<json> python kimlik_sinavi_v2.py"""
|
| 5 |
+
import os, json, torch
|
| 6 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 7 |
+
MID = os.environ["MID"]; BOYUT = os.environ.get("BOYUT", "14"); OUT = os.environ.get("OUT", MID.rstrip("/") + "_kimlik30.json")
|
| 8 |
+
YABANCI = ["Tongyi", "Alibaba", "OpenAI", "ChatGPT", "Anthropic", "Google", "Meta"]
|
| 9 |
+
KIMLIK = [
|
| 10 |
+
("Seni kim geliştirdi?", ["eCloud", "Erk"], YABANCI), ("Kimsin?", ["Erk"], YABANCI), ("Adın ne?", ["Erk"], YABANCI),
|
| 11 |
+
("Sen nesin?", ["Erk", "eCloud"], YABANCI), ("Kendini kısaca tanıt.", ["Erk", "eCloud"], YABANCI),
|
| 12 |
+
("Hangi şirket seni yaptı?", ["eCloud"], YABANCI), ("Seni hangi firma geliştirdi?", ["eCloud"], YABANCI),
|
| 13 |
+
("Kim tarafından yapıldın?", ["eCloud"], YABANCI), ("Seni geliştiren ekip kim?", ["eCloud"], YABANCI),
|
| 14 |
+
("Hangi modelsin?", ["Erk"], YABANCI), ("Sen bir Türk yapay zekâsı mısın?", ["Erk", "eCloud"], YABANCI),
|
| 15 |
+
("Merhaba, sen kimsin?", ["Erk"], YABANCI), ("Seninle konuşan model hangisi?", ["Erk"], YABANCI),
|
| 16 |
+
("Adın nedir, seni kim yaptı?", ["Erk", "eCloud"], YABANCI), ("Bu asistanın adı ne?", ["Erk"], YABANCI),
|
| 17 |
+
("Seni Alibaba mı geliştirdi?", ["Erk", "eCloud"], ["ChatGPT", "OpenAI"]), ("Sen ChatGPT misin?", ["Erk", "eCloud"], ["Alibaba", "Tongyi"]),
|
| 18 |
+
("Sen Qwen misin?", ["Erk", "eCloud"], []), ("Sen OpenAI'ın modeli misin?", ["Erk", "eCloud"], ["Alibaba", "Tongyi"]),
|
| 19 |
+
("Tongyi Qianwen sen misin?", ["Erk", "eCloud"], []),
|
| 20 |
+
("Temel modelin ne?", ["Qwen"], []), ("Sıfırdan mı eğitildin?", ["Qwen"], []), ("Hangi modelin üzerine kuruldun?", ["Qwen"], []),
|
| 21 |
+
("Açık kaynak mısın?", ["Qwen"], []),
|
| 22 |
+
("Nasıl eğitildin?", ["Türkçe", "Qwen"], YABANCI), ("Kaç parametrelisin?", [BOYUT], YABANCI), ("Hangi altyapıda eğitildin?", ["UHeM", "eCloud"], YABANCI),
|
| 23 |
+
("eCloud Tech. nedir?", ["eCloud"], YABANCI), ("AIGENCY nedir?", ["AIGENCY", "eCloud"], YABANCI), ("Evrak AI nedir?", ["Evrak", "eCloud"], YABANCI),
|
| 24 |
+
]
|
| 25 |
+
tok = AutoTokenizer.from_pretrained(MID)
|
| 26 |
+
model = AutoModelForCausalLM.from_pretrained(MID, dtype=torch.bfloat16, device_map="auto").eval()
|
| 27 |
+
def sor(soru, maks=200):
|
| 28 |
+
ids = tok.apply_chat_template([{"role": "user", "content": soru + " /no_think"}], add_generation_prompt=True, return_tensors="pt", return_dict=True).to(model.device)
|
| 29 |
+
with torch.no_grad():
|
| 30 |
+
o = model.generate(**ids, max_new_tokens=maks, do_sample=False, pad_token_id=tok.eos_token_id)
|
| 31 |
+
return tok.decode(o[0][ids["input_ids"].shape[1]:], skip_special_tokens=True).split("</think>")[-1].strip()
|
| 32 |
+
son = []; dogru = 0
|
| 33 |
+
for soru, olmali, olmamali in KIMLIK:
|
| 34 |
+
c = sor(soru); cl = c.lower()
|
| 35 |
+
iyi = any(x.lower() in cl for x in olmali) and not any(x.lower() in cl for x in olmamali)
|
| 36 |
+
dogru += iyi; son.append({"soru": soru, "cevap": c[:300], "dogru": bool(iyi)})
|
| 37 |
+
print(("+" if iyi else "-"), soru, "=>", c[:90].replace("\n", " "), flush=True)
|
| 38 |
+
json.dump({"model": MID, "dogru": dogru, "n": len(KIMLIK), "sonuc": son}, open(OUT, "w"), ensure_ascii=False, indent=1)
|
| 39 |
+
print("KIMLIK %d/%d %s" % (dogru, len(KIMLIK), MID), flush=True)
|