Text Generation
Transformers
Safetensors
GGUF
Chinese
English
mixtral
gomoku
ollama
Mixture of Experts
conversational
text-generation-inference
Instructions to use l898974766/gomoku with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use l898974766/gomoku with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="l898974766/gomoku") 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("l898974766/gomoku") model = AutoModelForCausalLM.from_pretrained("l898974766/gomoku", 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
- llama.cpp
How to use l898974766/gomoku 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 l898974766/gomoku:F32 # Run inference directly in the terminal: llama cli -hf l898974766/gomoku:F32
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf l898974766/gomoku:F32 # Run inference directly in the terminal: llama cli -hf l898974766/gomoku:F32
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 l898974766/gomoku:F32 # Run inference directly in the terminal: ./build/bin/llama cli -hf l898974766/gomoku:F32
Use Docker
docker model run hf.co/l898974766/gomoku:F32
- Llama new
- LM Studio
- Jan
- vLLM
How to use l898974766/gomoku with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "l898974766/gomoku" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "l898974766/gomoku", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/l898974766/gomoku:F32
- SGLang
How to use l898974766/gomoku 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 "l898974766/gomoku" \ --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": "l898974766/gomoku", "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 "l898974766/gomoku" \ --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": "l898974766/gomoku", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use l898974766/gomoku with Ollama:
ollama run hf.co/l898974766/gomoku:F32
- Unsloth Desktop
- Docker Model Runner
How to use l898974766/gomoku with Docker Model Runner:
docker model run hf.co/l898974766/gomoku:F32
- Lemonade
How to use l898974766/gomoku with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull l898974766/gomoku:F32
Run and chat with the model
lemonade run user.gomoku-F32
List all available models
lemonade list
- Atomic Chat
File size: 886 Bytes
e214fdf ab8fca0 e214fdf ab8fca0 e214fdf ab8fca0 e214fdf ab8fca0 e214fdf | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | """Complete-board prefix, then raw local candidates for a standard causal model."""
from window_protocol import coordinate, lines_at, validate_board, relative, parse_move
CONTEXT_LENGTH=2048
CHAT_TEMPLATE="{{ bos_token }}{% for message in messages %}{{ message['content'] }}{% endfor %}<move>"
def records(board,candidates=None):
validate_board(board)
selected=range(225) if candidates is None else sorted(set(candidates))
return [''.join('<line:'+line+'>' for line in lines_at(board,m))+coordinate(m)
for m in selected if not board[m]]
def board_text(board,candidates=None):
validate_board(board)
prefix=''.join('<'+coordinate(m)+':'+'.XO'[v]+'>' for m,v in enumerate(board))
return '<b>'+prefix+'</b><q>'+''.join(records(board,candidates))
def messages(board,candidates=None):
return [{'role':'user','content':board_text(board,candidates)}]
|