Text Generation
Transformers
Safetensors
English
llama
text-generation-inference
unsloth
conversational
Instructions to use beezza/202606021541 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use beezza/202606021541 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="beezza/202606021541") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("beezza/202606021541") model = AutoModelForCausalLM.from_pretrained("beezza/202606021541") 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 beezza/202606021541 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "beezza/202606021541" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "beezza/202606021541", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/beezza/202606021541
- SGLang
How to use beezza/202606021541 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 "beezza/202606021541" \ --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": "beezza/202606021541", "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 "beezza/202606021541" \ --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": "beezza/202606021541", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Studio
How to use beezza/202606021541 with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for beezza/202606021541 to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for beezza/202606021541 to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for beezza/202606021541 to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="beezza/202606021541", max_seq_length=2048, ) - Docker Model Runner
How to use beezza/202606021541 with Docker Model Runner:
docker model run hf.co/beezza/202606021541
| { | |
| "add_bos_token": false, | |
| "add_dummy_prefix_space": false, | |
| "add_eos_token": false, | |
| "add_prefix_space": false, | |
| "added_tokens_decoder": { | |
| "0": { | |
| "content": "<unk>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "1": { | |
| "content": "<s>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "2": { | |
| "content": "</s>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "3": { | |
| "content": "<pad>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "4": { | |
| "content": "<sep>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "5": { | |
| "content": "<mask>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "6": { | |
| "content": "<cls>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "7": { | |
| "content": "<|system|>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": false | |
| }, | |
| "8": { | |
| "content": "<|assistant|>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": false | |
| }, | |
| "9": { | |
| "content": "<|user|>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": false | |
| }, | |
| "10": { | |
| "content": "<|available_tools|>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": false | |
| }, | |
| "11": { | |
| "content": "<|tool_calls|>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": false | |
| }, | |
| "12": { | |
| "content": "<|tool_results|>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": false | |
| }, | |
| "13": { | |
| "content": "<|code|>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": false | |
| }, | |
| "14": { | |
| "content": "<|file|>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": false | |
| }, | |
| "102397": { | |
| "content": "<|prefix|>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": false | |
| }, | |
| "102398": { | |
| "content": "<|suffix|>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": false | |
| }, | |
| "102399": { | |
| "content": "<|middle|>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": false | |
| } | |
| }, | |
| "bos_token": "<s>", | |
| "clean_up_tokenization_spaces": false, | |
| "cls_token": "<cls>", | |
| "do_lower_case": false, | |
| "eos_token": "</s>", | |
| "extra_ids": 0, | |
| "extra_special_tokens": {}, | |
| "keep_accents": true, | |
| "legacy": false, | |
| "mask_token": "<mask>", | |
| "model_max_length": 8192, | |
| "pad_token": "<pad>", | |
| "padding_side": "right", | |
| "sep_token": "<sep>", | |
| "sp_model_kwargs": {}, | |
| "spaces_between_special_tokens": false, | |
| "tokenizer_class": "LlamaTokenizer", | |
| "unk_token": "<unk>", | |
| "use_default_system_prompt": false, | |
| "chat_template": "\n{%- set user_messages = messages | selectattr('role', 'equalto', 'user') | list %}\n{%- macro output_available_tools(tools, message) %}\n{%- if tools and (message == user_messages[-1]) %}\n {{- '<|available_tools|>[' }}\n {%- for tool in tools %}\n {%- set tool = tool.function %}\n {{- \"{\" }}\n {%- for key, val in tool.items() if key != \"return\" %}\n {%- if val is string %}\n {{- \"'\" + key + \"': '\" + val + \"'\" }}\n {%- else %}\n {{- \"'\" + key + \"': \" + val|string }}\n {%- endif %}\n {%- if not loop.last %}\n {{- \", \" }}\n {%- endif %}\n {%- endfor %}\n {{- \"}\" }}\n {%- if not loop.last %}\n {{- \", \" }}\n {%- else %}\n {{- \"]\" }}\n {%- endif %}\n {%- endfor %}\n {{- eos_token -}}\n{%- endif %}\n{%- endmacro %}\n\n{%- macro output_tool_results(tool_results) %}\n{{- '<|tool_results|>[' }}\n{%- for tool_result in tool_results %}\n {{- \"{'content': \" + tool_result.content|string + \", 'call_id': '\" + tool_result.call_id + \"'}\" }}\n{%- endfor %}\n{{- ']' }}\n{{- eos_token -}}\n{%- endmacro %}\n\n{%- macro output_tool_calls(tool_calls) %}\n{{- '<|tool_calls|>[' }}\n{%- for tool_call in tool_calls %}\n {{- \"{'id': '\" + tool_call.id + \"', 'name': '\" + tool_call.name + \"', 'arguments': \" + tool_call.arguments|string + '}' }}\n{%- endfor %}\n{{- ']' }}\n{%- endmacro %}\n\n{%- for message in messages %}\n {%- if message['role'] == 'user' %}\n {%- if tools is defined %}\n {{- output_available_tools(tools, message) }}\n {%- endif %}\n {{- '<|user|>' + message['content'] + eos_token -}}\n {%- elif message['role'] == 'system' %}\n {{- '<|system|>' + message['content'] + eos_token -}}\n {%- elif message['role'] == 'assistant' %}\n {% set assistant_content = \"\" %}\n {%- if message.content is defined %}\n {% set assistant_content = message.content %}\n {%- endif %}\n {%- if message.tool_calls is defined and message.tool_calls -%}\n {{- '<|assistant|>' + assistant_content + output_tool_calls(message['tool_calls']) + eos_token -}}\n {%- else %}\n {{- '<|assistant|>' + assistant_content + eos_token }}\n {%- endif %}\n {%- elif message['role'] == 'tool_results' %}\n {{- output_tool_results(message.tool_results) }}\n {%- endif %}\n{%- if loop.last and add_generation_prompt -%}\n {{- '<|assistant|>' -}}\n{%- endif -%}\n{%- endfor %}\n" | |
| } |