Instructions to use travis-moore/twi-qwen-v1-merged with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use travis-moore/twi-qwen-v1-merged with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="travis-moore/twi-qwen-v1-merged") 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("travis-moore/twi-qwen-v1-merged") model = AutoModelForCausalLM.from_pretrained("travis-moore/twi-qwen-v1-merged", 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 travis-moore/twi-qwen-v1-merged with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "travis-moore/twi-qwen-v1-merged" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "travis-moore/twi-qwen-v1-merged", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/travis-moore/twi-qwen-v1-merged
- SGLang
How to use travis-moore/twi-qwen-v1-merged 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 "travis-moore/twi-qwen-v1-merged" \ --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": "travis-moore/twi-qwen-v1-merged", "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 "travis-moore/twi-qwen-v1-merged" \ --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": "travis-moore/twi-qwen-v1-merged", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use travis-moore/twi-qwen-v1-merged with Docker Model Runner:
docker model run hf.co/travis-moore/twi-qwen-v1-merged
Sema LLM โ twi-qwen-v1
A Twi / English / Nigerian Pidgin code-switching conversational model, fine-tuned from a Qwen3.5 hybrid-attention base. Built by Sema Ink as Ama, a bilingual Ghanaian assistant.
Overview
- Languages: Akan/Twi (
tw), English (en), Nigerian Pidgin (pcm) โ including natural intra-sentence code-switching. - Task: instruction-following chat / conversation.
- Base architecture: Qwen3.5 (
Qwen3_5ForCausalLM) โ a gated hybrid-attention transformer: 32 layers with full attention every 4th layer (8 full-attention + 24 linear-attention), hidden size 4096, vocabulary 248,320, context length up to 262,144 tokens, bf16. ~9B parameters. - Reasoning: supports an optional thinking mode via the chat template (
enable_thinking). Default usage keeps it off for clean, direct answers; set itTrueto expose the reasoning trace.
Usage (transformers)
Requires a
transformersbuild with Qwen3.5 support (install from source) andtrust_remote_code=True.
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "travis-moore/twi-qwen-v1-merged"
tok = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
model_id, torch_dtype=torch.bfloat16, device_map="auto", trust_remote_code=True
)
messages = [
{"role": "system", "content": "You are Ama, a helpful bilingual Twi-English assistant."},
{"role": "user", "content": "Maakye! Wo ho te sษn?"},
]
text = tok.apply_chat_template(
messages, tokenize=False, add_generation_prompt=True, enable_thinking=False
)
ids = tok(text, return_tensors="pt").to(model.device)
out = model.generate(
**ids, max_new_tokens=384, do_sample=True,
temperature=0.7, top_p=0.9, repetition_penalty=1.2,
)
print(tok.decode(out[0][ids["input_ids"].shape[1]:], skip_special_tokens=True))
Usage (vLLM)
The Qwen3.5 GDN-hybrid architecture needs a recent vLLM (e.g. the vllm/vllm-openai:latest image). It then serves an OpenAI-compatible /v1/chat/completions endpoint. Pass chat_template_kwargs={"enable_thinking": false} to suppress the reasoning trace.
Intended use
Conversational assistants, chatbots, and assistive tools for Ghanaian and West-African users who mix Twi, English, and Pidgin. Research and product use.
Limitations
- Twi and Pidgin are low-resource; expect errors on dense or rare Twi, named entities, numbers, and long-tail facts.
- This is an early version (v1); it has not been safety-tuned or red-teamed โ validate outputs before relying on them.
- Not evaluated against external benchmarks here; treat quality claims as anecdotal.
License
Released under Apache-2.0, inherited from the Qwen3-series base model.
Developed by
Sema Ink โ Twi / Ghanaian-language AI (speech recognition, text-to-speech, and chat).
- Downloads last month
- 34