Views
No views yet
A 105M-parameter bilingual causal language model with dual-mode reasoning, built on the Codon stack.
[cot_start] ... [cot_end]) and a direct non-thinking mode, switchable at inference time.
| Field | Value |
|---|---|
| Parameters | 105.41 M |
| Vocabulary | 8,192 (BPE, packed) |
| Architecture | Causal Transformer (decoder-only) |
| Position Encoding | RoPE, base = 500,000 |
| Training Context | 4,096 tokens |
| Languages | 中文 / English |
| Modes | Thinking / Non-thinking |
| Runtime | CUDA / CPU |
| Precision | fp32 / bf16 |
| License | See repository |
pip install codon-model==0.0.6a2motifa1_sft.safetensors — model weightsmotif.vocab — packed tokenizer (vocab + chat template + config in one zip)motifa1_sft.safetensors, then you can load as:1from codon.motif import MotifA1
2
3model = MotifA1().load_pretrained('motifa1_sft.safetensors').to('cuda')
4print(model.count_params(human_readable=True)) # -> 105.41 M1from codon.motif import MotifA1
2
3model = MotifA1().from_remote().to('cuda')
4print(model.count_params(human_readable=True)) # -> 105.41 M'cuda' with 'cpu'. Inference works out of the box, just slower.motif.vocab, then you can load as:1from codon.utils.tokens import PackedTokenizer
2
3tokenizer = PackedTokenizer('motif.vocab')1from codon.motif import MotifA1Tokenizer
2
3tokenizer = MotifA1Tokenizer().from_remote()1from codon.utils.generate import chat
2from rich.console import Console
3
4console = Console()
5
6for chunk in chat(
7 model, tokenizer, model.device,
8 messages=[{'role': 'user', 'content': 'Your Q'}],
9 stream=True,
10 max_new_tokens=1024,
11):
12 if chunk.cot_ended:
13 console.print('\n')
14 if chunk.is_cot:
15 console.print(chunk.content, end='', style='blue')
16 else:
17 console.print(chunk.content, end='')chunk.is_cot — whether the current span is inside a chain-of-thought blockchunk.cot_ended — fires once when the model exits thinking mode and begins the user-facing answerchunk.content — the decoded text fragment1from codon.utils.service import Service, ModelCard
2
3Service([
4 ModelCard(
5 model=model,
6 tokenizer=tokenizer,
7 model_id='Motif-A1',
8 owned='CodonProject'
9 )
10]).run(port=11305)[cot_start] and [cot_end], then produces the final answer. Recommended for math, multi-step reasoning, code planning.[cot_start][cot_end] block and answers directly. Recommended for chit-chat, translation, short-form generation, and latency-sensitive applications.chat helper exposes mode switching; consult the Codon docs for the parameter form your version exposes.