Run this model with HF Jobs
Run trl-internal-testing/tiny-FalconMambaForCausalLM 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/trl-internal-testing/tiny-FalconMambaForCausalLM. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/trl-internal-testing/tiny-FalconMambaForCausalLM on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/trl-internal-testing/tiny-FalconMambaForCausalLM. 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/trl-internal-testing/tiny-FalconMambaForCausalLM. 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 trl-internal-testing/tiny-FalconMambaForCausalLM with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use trl-internal-testing/tiny-FalconMambaForCausalLM with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="trl-internal-testing/tiny-FalconMambaForCausalLM") 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("trl-internal-testing/tiny-FalconMambaForCausalLM") model = AutoModelForCausalLM.from_pretrained("trl-internal-testing/tiny-FalconMambaForCausalLM", 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 trl-internal-testing/tiny-FalconMambaForCausalLM with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "trl-internal-testing/tiny-FalconMambaForCausalLM" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "trl-internal-testing/tiny-FalconMambaForCausalLM", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/trl-internal-testing/tiny-FalconMambaForCausalLM
- SGLang
How to use trl-internal-testing/tiny-FalconMambaForCausalLM 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 "trl-internal-testing/tiny-FalconMambaForCausalLM" \ --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": "trl-internal-testing/tiny-FalconMambaForCausalLM", "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 "trl-internal-testing/tiny-FalconMambaForCausalLM" \ --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": "trl-internal-testing/tiny-FalconMambaForCausalLM", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use trl-internal-testing/tiny-FalconMambaForCausalLM with Docker Model Runner:
docker model run hf.co/trl-internal-testing/tiny-FalconMambaForCausalLM
Upload FalconMambaForCausalLM
#1
by albertvillanova HF Staff - opened
Files changed (7)
- chat_template.jinja+4-17
- config.json+1-1
- generation_config.json+7-3
- model.safetensors+1-1
- special_tokens_map.json+19-5
- tokenizer.json+18-11
- tokenizer_config.json+18-12
1234567891011121314151617{% if messages[0]['role'] == 'system' %}{% set loop_messages = messages[1:] %}{% set system_message = messages[0]['content'] %}{% else %}{% set loop_messages = messages %}{% set system_message = '' %}{% endif %}{% for message in loop_messages %}{% if (message['role'] == 'user') != (loop.index0 % 2 == 0) %}{{ raise_exception('Conversation roles must alternate user/assistant/user/assistant/...') }}{% endif %}{% if loop.index0 == 0 %}{{ system_message.strip() }}{% endif %}{% if message['role'] == 'user' %}{{ 'User: ' + message['content'].strip().replace('', '').replace('', '') }}{% elif message['role'] == 'assistant' %}{{ 'Assistant: ' + message['content'].strip().replace('', '').replace('', '') }}{% endif %}{% endfor %}{% if add_generation_prompt %}{{ 'Assistant:' }}{% endif %}1234{{bos_token}}{% for message in messages %}{{'<|im_start|>' + message['role'] + '' + message['content'] + '<|im_end|>' + ''}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant' }}{% endif %}
26 unmodified lines2728293031323326 unmodified lines"time_step_min": 0.001,"time_step_rank": 1,"time_step_scale": 1.0,"transformers_version": "4.57.3","use_bias": false,"use_cache": true,"use_conv_bias": true,26 unmodified lines2728293031323326 unmodified lines"time_step_min": 0.001,"time_step_rank": 1,"time_step_scale": 1.0,"transformers_version": "4.56.2","use_bias": false,"use_cache": true,"use_conv_bias": true,
123456{"_from_model_config": true,"bos_token_id": 11,"eos_token_id": 11,"transformers_version": "4.57.3"}12345678910{"_from_model_config": true,"bos_token_id": 8,"eos_token_id": [11,10],"pad_token_id": 0,"transformers_version": "4.56.2"}
123version https://git-lfs.github.com/spec/v1oid sha256:e34184bba903070049396c35f41649f065728ff97772d131add5f7b63fa33379size 1053056123version https://git-lfs.github.com/spec/v1oid sha256:058b95590b4d09739a25ffa74f2b4728ce7b4f2b6e108903751774a26ebc88e9size 1053056
6 unmodified lines789101112131415161718196 unmodified lines">>COMMENT<<",">>ANSWER<<",">>QUESTION<<",">>DOMAIN<<",">>PREFIX<<",">>SUFFIX<<",">>MIDDLE<<"],"eos_token": {"content": "<|endoftext|>","lstrip": false,"normalized": false,"rstrip": false,6 unmodified lines7891011121314151617181920212223242526272829303132336 unmodified lines">>COMMENT<<",">>ANSWER<<",">>QUESTION<<","assistant","<|begin_of_text|>","<|im_start|>","<|im_end|>"],"bos_token": {"content": "<|begin_of_text|>","lstrip": false,"normalized": false,"rstrip": false,"single_word": false},"eos_token": {"content": "<|end_of_text|>","lstrip": false,"normalized": false,"rstrip": false,"single_word": false},"pad_token": {"content": ">>TITLE<<","lstrip": false,"normalized": false,"rstrip": false,
123456760 unmodified lines686970717273742 unmodified lines777879808182832 unmodified lines868788899091922 unmodified lines95969798991001012 unmodified lines10410510610710810911053 unmodified lines164165166167168169170171172173174{"version": "1.0","truncation": null,"padding": null,"added_tokens": [{"id": 0,60 unmodified lines},{"id": 7,"content": ">>DOMAIN<<","single_word": false,"lstrip": false,"rstrip": false,2 unmodified lines},{"id": 8,"content": ">>PREFIX<<","single_word": false,"lstrip": false,"rstrip": false,2 unmodified lines},{"id": 9,"content": ">>SUFFIX<<","single_word": false,"lstrip": false,"rstrip": false,2 unmodified lines},{"id": 10,"content": ">>MIDDLE<<","single_word": false,"lstrip": false,"rstrip": false,2 unmodified lines},{"id": 11,"content": "<|endoftext|>","single_word": false,"lstrip": false,"rstrip": false,53 unmodified lines">>COMMENT<<": 4,">>ANSWER<<": 5,">>QUESTION<<": 6,">>DOMAIN<<": 7,">>PREFIX<<": 8,">>SUFFIX<<": 9,">>MIDDLE<<": 10,"<|endoftext|>": 11,"!": 12,"\"": 13,"#": 14,123456789101112131460 unmodified lines757677787980812 unmodified lines848586878889902 unmodified lines939495969798992 unmodified lines1021031041051061071082 unmodified lines11111211311411511611753 unmodified lines171172173174175176177178179180181{"version": "1.0","truncation": null,"padding": {"strategy": "BatchLongest","direction": "Left","pad_to_multiple_of": null,"pad_id": 11,"pad_type_id": 0,"pad_token": "<|end_of_text|>"},"added_tokens": [{"id": 0,60 unmodified lines},{"id": 7,"content": "assistant","single_word": false,"lstrip": false,"rstrip": false,2 unmodified lines},{"id": 8,"content": "<|begin_of_text|>","single_word": false,"lstrip": false,"rstrip": false,2 unmodified lines},{"id": 9,"content": "<|im_start|>","single_word": false,"lstrip": false,"rstrip": false,2 unmodified lines},{"id": 10,"content": "<|im_end|>","single_word": false,"lstrip": false,"rstrip": false,2 unmodified lines},{"id": 11,"content": "<|end_of_text|>","single_word": false,"lstrip": false,"rstrip": false,53 unmodified lines">>COMMENT<<": 4,">>ANSWER<<": 5,">>QUESTION<<": 6,"assistant": 7,"<|begin_of_text|>": 8,"<|im_start|>": 9,"<|im_end|>": 10,"<|end_of_text|>": 11,"!": 12,"\"": 13,"#": 14,
57 unmodified lines585960616263641 unmodified line666768697071721 unmodified line747576777879801 unmodified line828384858687881 unmodified line909192939495969 unmodified lines10610710810911011111211311411511611711811912012112212357 unmodified lines"special": true},"7": {"content": ">>DOMAIN<<","lstrip": false,"normalized": false,"rstrip": false,1 unmodified line"special": true},"8": {"content": ">>PREFIX<<","lstrip": false,"normalized": false,"rstrip": false,1 unmodified line"special": true},"9": {"content": ">>SUFFIX<<","lstrip": false,"normalized": false,"rstrip": false,1 unmodified line"special": true},"10": {"content": ">>MIDDLE<<","lstrip": false,"normalized": false,"rstrip": false,1 unmodified line"special": true},"11": {"content": "<|endoftext|>","lstrip": false,"normalized": false,"rstrip": false,9 unmodified lines">>COMMENT<<",">>ANSWER<<",">>QUESTION<<",">>DOMAIN<<",">>PREFIX<<",">>SUFFIX<<",">>MIDDLE<<"],"clean_up_tokenization_spaces": false,"eos_token": "<|endoftext|>","extra_special_tokens": {},"model_input_names": ["input_ids","attention_mask"],"model_max_length": 2048,"tokenizer_class": "PreTrainedTokenizerFast"}57 unmodified lines585960616263641 unmodified line666768697071721 unmodified line747576777879801 unmodified line828384858687881 unmodified line909192939495969 unmodified lines10610710810911011111211311411511611711811912012112212312412512612712812957 unmodified lines"special": true},"7": {"content": "assistant","lstrip": false,"normalized": false,"rstrip": false,1 unmodified line"special": true},"8": {"content": "<|begin_of_text|>","lstrip": false,"normalized": false,"rstrip": false,1 unmodified line"special": true},"9": {"content": "<|im_start|>","lstrip": false,"normalized": false,"rstrip": false,1 unmodified line"special": true},"10": {"content": "<|im_end|>","lstrip": false,"normalized": false,"rstrip": false,1 unmodified line"special": true},"11": {"content": "<|end_of_text|>","lstrip": false,"normalized": false,"rstrip": false,9 unmodified lines">>COMMENT<<",">>ANSWER<<",">>QUESTION<<","assistant","<|begin_of_text|>","<|im_start|>","<|im_end|>"],"bos_token": "<|begin_of_text|>","clean_up_tokenization_spaces": true,"eos_token": "<|end_of_text|>","extra_special_tokens": {},"max_length": null,"model_input_names": ["input_ids","attention_mask"],"model_max_length": 1000000000000000019884624838656,"pad_to_multiple_of": null,"pad_token": ">>TITLE<<","pad_token_type_id": 0,"padding_side": "left","tokenizer_class": "PreTrainedTokenizerFast"}
chat_template.jinja+4-17
config.json+1-1
generation_config.json+7-3
model.safetensors+1-1
special_tokens_map.json+19-5
tokenizer.json+18-11
tokenizer_config.json+18-12