Text Generation
Transformers
Safetensors
qwen2
godot
gdscript
qlora
game-development
conversational
text-generation-inference
Instructions to use khursheed/VibeGame-8B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use khursheed/VibeGame-8B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="khursheed/VibeGame-8B") 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("khursheed/VibeGame-8B") model = AutoModelForCausalLM.from_pretrained("khursheed/VibeGame-8B", 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 khursheed/VibeGame-8B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "khursheed/VibeGame-8B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "khursheed/VibeGame-8B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/khursheed/VibeGame-8B
- SGLang
How to use khursheed/VibeGame-8B 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 "khursheed/VibeGame-8B" \ --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": "khursheed/VibeGame-8B", "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 "khursheed/VibeGame-8B" \ --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": "khursheed/VibeGame-8B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use khursheed/VibeGame-8B with Docker Model Runner:
docker model run hf.co/khursheed/VibeGame-8B
File size: 2,547 Bytes
ae36cfb | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | #!/usr/bin/env python3
"""Install a checksum-pinned official Godot 4 editor (includes headless mode)."""
import argparse
import hashlib
import json
import os
from pathlib import Path
import platform
import stat
import urllib.request
import zipfile
VERSION = "4.5.1-stable"
ASSETS = {
"Darwin": ("Godot_v4.5.1-stable_macos.universal.zip", "65c27959d02aaacfc131ec7ecb90179ba8045200cb02982bf2be96d117010b8a", "Godot.app/Contents/MacOS/Godot"),
"Linux": ("Godot_v4.5.1-stable_linux.x86_64.zip", "02ec53d1cc7dbb9cc6355393c61b9ab43d1244751a124f10248a4802830788cd", "Godot_v4.5.1-stable_linux.x86_64"),
}
def install(destination: Path) -> Path:
system = platform.system()
if system not in ASSETS or (system == "Linux" and platform.machine() not in ("x86_64", "AMD64")):
raise RuntimeError("Only macOS universal and Linux x86_64 are supported")
filename, expected, relative = ASSETS[system]
destination = destination.expanduser().resolve()
destination.mkdir(parents=True, exist_ok=True)
archive = destination / filename
url = f"https://github.com/godotengine/godot-builds/releases/download/{VERSION}/{filename}"
if not archive.exists():
temporary = archive.with_suffix(".download")
urllib.request.urlretrieve(url, temporary)
temporary.replace(archive)
actual = hashlib.sha256(archive.read_bytes()).hexdigest()
if actual != expected:
raise RuntimeError(f"Godot archive checksum mismatch: {archive}; remove and retry")
binary = destination / relative
if not binary.exists():
with zipfile.ZipFile(archive) as zf:
for member in zf.infolist():
candidate = (destination / member.filename).resolve()
if not candidate.is_relative_to(destination):
raise RuntimeError("Unsafe archive path")
mode = member.external_attr >> 16
if stat.S_ISLNK(mode):
raise RuntimeError("Unexpected archive symlink")
zf.extractall(destination)
binary.chmod(0o755)
(destination / "installation.json").write_text(json.dumps({"version": VERSION, "url": url, "archive_sha256": actual, "binary_sha256": hashlib.sha256(binary.read_bytes()).hexdigest(), "binary": str(binary)}, indent=2) + "\n")
return binary
if __name__ == "__main__":
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument("--destination", type=Path, default=Path(".tools/godot"))
args = parser.parse_args()
print(install(args.destination))
|