Instructions to use 7eu7d7/beam-ime-0.6b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use 7eu7d7/beam-ime-0.6b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="7eu7d7/beam-ime-0.6b") 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("7eu7d7/beam-ime-0.6b") model = AutoModelForCausalLM.from_pretrained("7eu7d7/beam-ime-0.6b", 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 7eu7d7/beam-ime-0.6b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "7eu7d7/beam-ime-0.6b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "7eu7d7/beam-ime-0.6b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/7eu7d7/beam-ime-0.6b
- SGLang
How to use 7eu7d7/beam-ime-0.6b 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 "7eu7d7/beam-ime-0.6b" \ --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": "7eu7d7/beam-ime-0.6b", "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 "7eu7d7/beam-ime-0.6b" \ --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": "7eu7d7/beam-ime-0.6b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use 7eu7d7/beam-ime-0.6b with Docker Model Runner:
docker model run hf.co/7eu7d7/beam-ime-0.6b
Beam IME 0.6B (bf16)
The full-precision weights of the model behind Beam IME, a local Chinese input method for Fcitx5-Rime and Weasel. The model reads the keys you typed (full pinyin, initials, mixed syllable prefixes and complete English words) and writes the text.
- Base: Qwen/Qwen3-0.6B-Base, full-parameter SFT
- Internal name: r5-v2ex (one epoch, 3.84M examples, max length 128 tokens, lr 2e-5)
- Weights: bf16 safetensors; input and output embeddings are tied
- Prompt:
keys_llm_v1 - License: Apache-2.0
The Q8_0 GGUF shipped with Beam (beam-0.6b-q8_0.gguf, SHA-256 35eccd83…7203309c, in the
v0.1.0-beta.1 release) is quantized from exactly
these weights: re-quantizing every tensor of this checkpoint to Q8_0 reproduces that file's tensors byte for byte.
Use the GGUF for the input method itself; this checkpoint is for further training, evaluation, or applying the
Beam LoRA adapters with PEFT.
Prompt
上文:<up to 64 recently committed characters, line omitted when empty>
按键:<keys, one letter per token separated by spaces>
结果:<text><|endoftext|>
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
tok = AutoTokenizer.from_pretrained("7eu7d7/beam-ime-0.6b")
model = AutoModelForCausalLM.from_pretrained("7eu7d7/beam-ime-0.6b", dtype=torch.bfloat16)
prompt = "上文:今晚\n按键:" + " ".join("wmqcfb") + "\n结果:"
ids = tok(prompt, return_tensors="pt").input_ids
out = model.generate(ids, max_new_tokens=16, num_beams=4, num_return_sequences=3, do_sample=False,
pad_token_id=tok.eos_token_id)
print([tok.decode(o[ids.shape[1]:], skip_special_tokens=True) for o in out])
# ['我们去吃饭吧', '我们去吃饭不', '我们去吃饭呗']
Other outputs from this checkpoint: nihao → 你好, mingtianjian → 明天见, yonglinux → 用Linux.
Adapters
- English translation: translate-en-v1,
a LoRA (r128) trained on this checkpoint with prompt
keys_llm_v4. The release has both a GGUF for Beam and the PEFT checkpoint; itsadapter_config.jsonnames the basebeam-0.6b-r5-v2ex, which is this repository.
Training data
LCCC, GeneInput, V2EX, Rime vocabulary, and chat and vocabulary data provided by the maintainer, with synthetic typing variants (full spelling, initials, mixed prefixes, English words). GeneInput is published without a license; LCCC is MIT. The training data is not released.
Limitations
Initials are ambiguous and the model picks one reading; it can produce unexpected colloquial choices. Sequence scores are not confidence estimates; an input method shows several candidates and the user chooses. Inputs are limited to 40 key letters in Beam.
- Downloads last month
- 20
Model tree for 7eu7d7/beam-ime-0.6b
Base model
Qwen/Qwen3-0.6B-Base