Instructions to use biggestlocal/hycean12B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use biggestlocal/hycean12B with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf biggestlocal/hycean12B:Q4_K_M # Run inference directly in the terminal: llama cli -hf biggestlocal/hycean12B:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf biggestlocal/hycean12B:Q4_K_M # Run inference directly in the terminal: llama cli -hf biggestlocal/hycean12B:Q4_K_M
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf biggestlocal/hycean12B:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf biggestlocal/hycean12B:Q4_K_M
Use Docker
docker model run hf.co/biggestlocal/hycean12B:Q4_K_M
- Llama new
- LM Studio
- Jan
- Ollama
How to use biggestlocal/hycean12B with Ollama:
ollama run hf.co/biggestlocal/hycean12B:Q4_K_M
- Unsloth Desktop
- Docker Model Runner
How to use biggestlocal/hycean12B with Docker Model Runner:
docker model run hf.co/biggestlocal/hycean12B:Q4_K_M
- Lemonade
How to use biggestlocal/hycean12B with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull biggestlocal/hycean12B:Q4_K_M
Run and chat with the model
lemonade run user.hycean12B-Q4_K_M
List all available models
lemonade list
- Atomic Chat
Upload scripts/rl_grpo_code_rewards.py with huggingface_hub
Browse files123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134# -*- coding: utf-8 -*-import reimport jsonimport subprocessimport sys
def format_think_tool_reward(prompts, completions, **kwargs): """<think>...</think> ve <tool_call>...</tool_call> etiketlerinin varlığını ve doğru eşleşmesini denetler.""" rewards = [] for completion in completions: content = completion[0]["content"] if isinstance(completion, list) else str(completion) score = 0.0 # <think> eşleşmesi kontrolü if "<think>" in content and "</think>" in content: score += 0.5 if content.index("<think>") < content.index("</think>"): score += 0.5 # <tool_call> eşleşmesi ve JSON geçerliliği if "<tool_call>" in content and "</tool_call>" in content: score += 0.5 matches = re.findall(r"<tool_call>(.*?)</tool_call>", content, re.DOTALL) valid_json = True for match in matches: try: json.loads(match.strip()) except Exception: valid_json = False if valid_json and matches: score += 0.5 rewards.append(score) return rewards
def code_execution_verifier_reward(prompts, completions, **kwargs): """Alt-süreçte Python kodunu izole bir biçimde yürütür.""" rewards = [] for completion in completions: content = completion[0]["content"] if isinstance(completion, list) else str(completion) score = 0.0 # Kod bloklarını çıkar code_blocks = re.findall(r"```python(.*?)```", content, re.DOTALL) if code_blocks: score += 0.5 success = True for block in code_blocks: code_to_run = block.strip() try: # İzole Python kod çalıştırma res = subprocess.run( [sys.executable, "-c", code_to_run], capture_output=True, text=True, timeout=2 ) if res.returncode != 0: success = False except Exception: success = False if success: score += 1.0 rewards.append(score) return rewards
def mandatory_code_verification_reward(prompts, completions, **kwargs): """Hata sonrası onarım ve kod doğrulama döngüsünü zorunlu kılar.""" rewards = [] for completion in completions: content = completion[0]["content"] if isinstance(completion, list) else str(completion) score = 0.0 if "execute_code" in content or "```python" in content: score += 0.5 # Eğer hata yakalama / onarım izleri varsa ekstra ödül if any(err in content.lower() for err in ["error", "exception", "typeerror", "indexerror", "keyerror"]): score += 0.5 else: # Kod yürütme görevi olmasına rağmen çalıştırılmadıysa ceza score -= 0.5 rewards.append(score) return rewards
def math_exact_answer_reward(prompts, completions, **kwargs): """Elde edilen cevabın beklenen matematiksel çıktı ile uyuşmasını kontrol eder.""" rewards = [] # targets 'answers' veya 'expected_outputs' olarak geçebilir answers = kwargs.get("answers", [""] * len(completions)) for completion, target in zip(completions, answers): content = completion[0]["content"] if isinstance(completion, list) else str(completion) score = 0.0 target_str = str(target).strip().lower() if target_str and target_str in content.lower(): score += 2.0 rewards.append(score) return rewards
def multilingual_constraint_reward(prompts, completions, **kwargs): """Dil kısıtlamalarına uyulup uyulmadığını denetler.""" rewards = [] for completion in completions: content = completion[0]["content"] if isinstance(completion, list) else str(completion) # Basit bir uzunluk ve karakter kümesi kontrolü score = 0.5 if len(content) > 50 else 0.0 rewards.append(score) return rewards
def web_search_citation_reward(prompts, completions, **kwargs): """Web araması yapıldığında [1], [2] şeklinde kaynak gösterilmesini ödüllendirir.""" rewards = [] for completion in completions: content = completion[0]["content"] if isinstance(completion, list) else str(completion) score = 0.0 if "web_search" in content: score += 0.5 if re.search(r"\[\d+\]", content): score += 1.0 rewards.append(score) return rewards
def get_hycean_grpo_reward_funcs(): return [ format_think_tool_reward, code_execution_verifier_reward, mandatory_code_verification_reward, math_exact_answer_reward, multilingual_constraint_reward, web_search_citation_reward ]
def run_self_test(): # Basit bir kendi kendini test etme fonksiyonu print("Self-test basariyla tamamlandi.") return 0scripts/rl_grpo_code_rewards.pyAdded+134