Run this model with HF Jobs
Run MelosY/TextMonkey on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/MelosY/TextMonkey. Ask me which dataset to train on, then push the LoRA adapter to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs and Transformers to run batch inference with https://huggingface.co/MelosY/TextMonkey on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the predictions back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs and Lighteval to evaluate https://huggingface.co/MelosY/TextMonkey. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/MelosY/TextMonkey with Transformers and bitsandbytes. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use MelosY/TextMonkey with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use MelosY/TextMonkey with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="MelosY/TextMonkey", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("MelosY/TextMonkey", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use MelosY/TextMonkey with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "MelosY/TextMonkey" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MelosY/TextMonkey", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/MelosY/TextMonkey
- SGLang
How to use MelosY/TextMonkey 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 "MelosY/TextMonkey" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MelosY/TextMonkey", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "MelosY/TextMonkey" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MelosY/TextMonkey", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use MelosY/TextMonkey with Docker Model Runner:
docker model run hf.co/MelosY/TextMonkey
config
Browse filesFiles changed (5)
- config.jsonAdded+64
- generation_config.jsonAdded+11
- qwen.tiktokenAdded
- special_tokens_map.jsonAdded+3
- tokenizer_config.jsonAdded+14
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364{ "_name_or_path": "/home/kas/checkpoint/v4/correct_data/img896_window_resampler_scratch", "architectures": [ "QWenLMHeadModel" ], "attn_dropout_prob": 0.0, "auto_map": { "AutoConfig": "configuration_qwen.QWenConfig", "AutoModelForCausalLM": "modeling_qwen.QWenLMHeadModel" }, "bf16": true, "emb_dropout_prob": 0.0, "fp16": false, "fp32": false, "hidden_size": 4096, "initializer_range": 0.02, "intermediate_size": 22016, "kv_channels": 128, "layer_norm_epsilon": 1e-06, "max_position_embeddings": 8192, "model_type": "qwen", "no_bias": true, "num_attention_heads": 32, "num_hidden_layers": 32, "onnx_safe": null, "rotary_emb_base": 10000, "rotary_pct": 1.0, "scale_attn_weights": true, "seq_length": 2048, "tie_word_embeddings": false, "tokenizer_type": "QWenTokenizer", "torch_dtype": "bfloat16", "transformers_version": "4.32.0", "use_cache": false, "use_dynamic_ntk": true, "use_flash_attn": false, "use_logn_attn": true, "visual": { "add_window": true, "down_sample": false, "fuse_type": "none", "heads": 16, "hierarchy": false, "image_height": 448, "image_size": [ 896, 896 ], "image_start_id": 151857, "image_width": 448, "layers": 48, "lora_repeat_num": 0, "mlp_ratio": 4.9231, "n_queries": 768, "output_dim": 4096, "patch_size": 14, "r": 512, "resampler": true, "use_global": true, "use_latents": false, "width": 1664 }, "vocab_size": 151936}1234567891011{ "chat_format": "raw", "do_sample": true, "eos_token_id": 151643, "max_new_tokens": 512, "max_window_size": 6144, "pad_token_id": 151643, "top_k": 0, "top_p": 0.5, "transformers_version": "4.32.0"}123{ "pad_token": "<|endoftext|>"}1234567891011121314{ "auto_map": { "AutoTokenizer": [ "tokenization_qwen.QWenTokenizer", null ] }, "clean_up_tokenization_spaces": true, "model_max_length": 4096, "padding_side": "right", "tokenizer_class": "QWenTokenizer", "trust_remote_code": true, "use_fast": false}config.jsonAdded+64
generation_config.jsonAdded+11
qwen.tiktokenAdded
special_tokens_map.jsonAdded+3
tokenizer_config.jsonAdded+14