Text Generation
Transformers
Safetensors
English
Vietnamese
qwen2
gamedev
godot
json
spawn-point
awq
conversational
text-generation-inference
4-bit precision
Instructions to use smoky1496/SpawnPoint-Coder-7B-AWQ with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use smoky1496/SpawnPoint-Coder-7B-AWQ with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="smoky1496/SpawnPoint-Coder-7B-AWQ") 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("smoky1496/SpawnPoint-Coder-7B-AWQ") model = AutoModelForCausalLM.from_pretrained("smoky1496/SpawnPoint-Coder-7B-AWQ", 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 smoky1496/SpawnPoint-Coder-7B-AWQ with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "smoky1496/SpawnPoint-Coder-7B-AWQ" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "smoky1496/SpawnPoint-Coder-7B-AWQ", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/smoky1496/SpawnPoint-Coder-7B-AWQ
- SGLang
How to use smoky1496/SpawnPoint-Coder-7B-AWQ 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 "smoky1496/SpawnPoint-Coder-7B-AWQ" \ --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": "smoky1496/SpawnPoint-Coder-7B-AWQ", "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 "smoky1496/SpawnPoint-Coder-7B-AWQ" \ --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": "smoky1496/SpawnPoint-Coder-7B-AWQ", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use smoky1496/SpawnPoint-Coder-7B-AWQ with Docker Model Runner:
docker model run hf.co/smoky1496/SpawnPoint-Coder-7B-AWQ
|
Download README.md from smoky1496/SpawnPoint-Coder-7B-AWQ: direct link, hf CLI and curl.
- Browser
- Download file 4.75 kB
-
https://huggingface.co/smoky1496/SpawnPoint-Coder-7B-AWQ/resolve/main/README.md
- Command line
-
hf download hf://smoky1496/SpawnPoint-Coder-7B-AWQ/README.md
-
curl -L -o README.md https://huggingface.co/smoky1496/SpawnPoint-Coder-7B-AWQ/resolve/main/README.md
4.75 kB
| license: apache-2.0 | |
| language: [en, vi] | |
| library_name: transformers | |
| tags: [gamedev, godot, json, spawn-point, awq] | |
| # SpawnPoint-Coder-7B | |
| **A 7B model that generates Godot 4 games.** Fine-tuned for [Spawn Point](https://github.com/leluong141996-dev/Spawn-Point), | |
| an open-source autonomous game studio: you describe a game in plain English or Vietnamese, the model writes | |
| the game design as strict JSON, and Spawn Point compiles it into a playable Godot 4 project (scenes, GDScript | |
| components, levels, sprites) that runs on desktop or in the browser. | |
| What it does inside the pipeline: | |
| - **Design**: game idea → the game's design (one small schema per genre: character, abilities, enemies, goal, art style, feel). | |
| - **Tweak**: "jump 20% higher, add a sword, make it cartoon" → a precise patch of the game. | |
| - **Edit an entity**: "double its health and make it shoot fireballs" → component and parameter changes. | |
| 4-bit AWQ, runs on a single 12 GB GPU. | |
| **What's new in v5** | |
| - **Side-scrolling shooters** ("a falcon ship fights drones and saucers, the boss is a mothership"): enemies that | |
| fly straight, in waves, dive at you or stop and shoot; power-ups; a boss. | |
| - **Vietnamese is read directly**: no separate translation step, so names come out right ("chú vịt" is a Duck). | |
| - **One small schema per genre**: shorter answers and prompts (a third of the v4 prompt) and no cross-genre | |
| mistakes such as a rescue target in a farm. | |
| - Fixes from v4: "a wizard shooting skeletons" keeps the shoot ability, "collect coins" is a collect goal, an unnamed | |
| pickup is a Coin. | |
| **Needs Spawn Point 0.3 or later**: v5 answers in the per-genre format. Older Spawn Point versions expect the v4 | |
| format; use release `v4-release` of this repo with them. | |
| ## Run it | |
| ```bash | |
| docker run --gpus all -p 8000:8000 --ipc=host vllm/vllm-openai:v0.10.2 \ | |
| --model smoky1496/SpawnPoint-Coder-7B-AWQ --served-model-name SpawnPoint-Coder-7B --max-model-len 16384 --gpu-memory-utilization 0.85 | |
| ``` | |
| Then Spawn Point finds it automatically at `http://localhost:8000/v1`. | |
| ## Evaluation | |
| Hand-written prompts in English and Vietnamese through the whole pipeline, same server and sampling for both versions. | |
| Sealed sets were written before training and not looked at until the release decision. The first two rows include | |
| prompts about the genre v4 did not know, so v4 cannot be expected to answer them. | |
| | benchmark (prompts fully right) | v4 | v5 (this release) | | |
| |---|---|---| | |
| | **sealed set: shooters and the v4 fixes** (16 prompts) | 56% | 88% | | |
| | dev set: shooters and the v4 fixes (24 prompts) | 54% | 83% | | |
| | sealed set: farms, tower defense, cartoon (12 prompts) | 67% | 92% | | |
| | 16 prompts: farms, tower defense, melee, cartoon | 75% | 75% | | |
| | sealed set: the first nine genres (12 prompts) | 67% | 58% | | |
| | 30 human-written prompts | 87% | 80% | | |
| | 12 prompts: bubble, rescue, survivor | 92% | 92% | | |
| **Where v5 is a little behind v4**: on the 30 prompts and the sealed set written before shooters and farms existed. | |
| Some of those prompts are now genuinely ambiguous ("a space shooter" can be a side-scrolling shooter, "a farm game" | |
| a farming game), and a few name the player only indirectly ("a tank shooting monsters": the tank can come out as the | |
| default hero). Results vary by one to three prompts per set from run to run. A patch for this is planned. | |
| Held-out synthetic examples with one exact answer (v5 only: they use the v5 format): briefs 73%, tweaks 98%, entity edits 100%. | |
| The 4-bit AWQ files you download, measured the same way: | |
| | benchmark (prompts fully right) | AWQ build | | |
| |---|---| | |
| | **sealed set: shooters and the v4 fixes** (16 prompts) | 75% | | |
| | 30 human-written prompts | 77% | | |
| | dev set: shooters and the v4 fixes (24 prompts) | 83% | | |
| ## Limitations | |
| - Fine-tuned only for the 2D game kinds Spawn Point builds: **platformers (including rescue missions and sword | |
| fighting), top-down arenas and survivors, bubble shooters, farming games, tower defense and side-scrolling | |
| shooters**. Other genres (3D, RPG systems, card games, racing…) and free-form Godot coding were not part of the | |
| training data, so expect results no better than a general 7B coder model there. | |
| - Prompts that do not say the genre can be read either way ("a space shooter" may come out as a side-scrolling | |
| shooter, "a farm game" as a farming game). | |
| - It writes Spawn Point's JSON formats; the GDScript itself comes from Spawn Point's tested component | |
| library, not from the model. Outside Spawn Point it is a general coding model with a narrow specialty. | |
| - Occasionally one detail of a request is missed (an enemy's name, a palette); Spawn Point's validator and | |
| normalizer catch most of these. | |
| ## License | |
| Apache 2.0, see `LICENSE` and `NOTICE`. | |