Text Generation
Transformers
ONNX
Safetensors
English
qwen2
dictation
cleanup
transcript
lora
mumble
conversational
text-generation-inference
Instructions to use adikuma/mumble-cleanup with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use adikuma/mumble-cleanup with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="adikuma/mumble-cleanup") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("adikuma/mumble-cleanup") model = AutoModelForCausalLM.from_pretrained("adikuma/mumble-cleanup") 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use adikuma/mumble-cleanup with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "adikuma/mumble-cleanup" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "adikuma/mumble-cleanup", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/adikuma/mumble-cleanup
- SGLang
How to use adikuma/mumble-cleanup 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 "adikuma/mumble-cleanup" \ --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": "adikuma/mumble-cleanup", "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 "adikuma/mumble-cleanup" \ --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": "adikuma/mumble-cleanup", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use adikuma/mumble-cleanup with Docker Model Runner:
docker model run hf.co/adikuma/mumble-cleanup
| # tar the run dir with the model, onnx, eval.json, and a manifest. prints the | |
| # sha256 and a scp line for the user to copy. | |
| import hashlib | |
| import json | |
| import tarfile | |
| from pathlib import Path | |
| def _sha256_file(path: Path) -> str: | |
| h = hashlib.sha256() | |
| with open(path, "rb") as f: | |
| while True: | |
| chunk = f.read(1024 * 1024) | |
| if not chunk: | |
| break | |
| h.update(chunk) | |
| return h.hexdigest() | |
| def pack(run_dir: Path, dist_dir: Path, run_id: str) -> Path: | |
| run_dir = Path(run_dir) | |
| dist_dir = Path(dist_dir) | |
| dist_dir.mkdir(parents=True, exist_ok=True) | |
| # whitelist what we ship. excludes optimizer state, training_args, etc. | |
| include = [ | |
| run_dir / "model", | |
| run_dir / "onnx", | |
| run_dir / "eval.json", | |
| run_dir / "training_history.json", | |
| run_dir / "train_summary.json", | |
| ] | |
| manifest = {"files": []} | |
| for p in include: | |
| if not p.exists(): | |
| continue | |
| if p.is_file(): | |
| manifest["files"].append({ | |
| "path": str(p.relative_to(run_dir)), | |
| "size": p.stat().st_size, | |
| "sha256": _sha256_file(p), | |
| }) | |
| else: | |
| for child in p.rglob("*"): | |
| if child.is_file(): | |
| manifest["files"].append({ | |
| "path": str(child.relative_to(run_dir)), | |
| "size": child.stat().st_size, | |
| "sha256": _sha256_file(child), | |
| }) | |
| manifest_path = run_dir / "manifest.json" | |
| manifest_path.write_text(json.dumps(manifest, indent=2)) | |
| tarball = dist_dir / f"mumble-cleanup-{run_id}.tar.gz" | |
| print(f"[pack] writing {tarball}") | |
| with tarfile.open(tarball, "w:gz") as tar: | |
| tar.add(manifest_path, arcname="manifest.json") | |
| for p in include: | |
| if p.exists(): | |
| tar.add(p, arcname=p.relative_to(run_dir)) | |
| digest = _sha256_file(tarball) | |
| print(f"[pack] tarball sha256: {digest}") | |
| print() | |
| print("scp it down with:") | |
| print(f" vastai copy <INSTANCE_ID>:/workspace/cleanup/{tarball} ./dist/{tarball.name}") | |
| print() | |
| print(f"verify locally with:") | |
| print(f" sha256sum dist/{tarball.name} # expect: {digest}") | |
| return tarball | |