Text Generation
Transformers
Safetensors
Chinese
English
pma3
patriot-memory
viper-gaming
hardware
edge
small-language-model
traditional-chinese
conversational
custom_code
Instructions to use patriotmemory-ai/PMA-1.3-Rosa-256M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use patriotmemory-ai/PMA-1.3-Rosa-256M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="patriotmemory-ai/PMA-1.3-Rosa-256M", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("patriotmemory-ai/PMA-1.3-Rosa-256M", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use patriotmemory-ai/PMA-1.3-Rosa-256M with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "patriotmemory-ai/PMA-1.3-Rosa-256M" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "patriotmemory-ai/PMA-1.3-Rosa-256M", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/patriotmemory-ai/PMA-1.3-Rosa-256M
- SGLang
How to use patriotmemory-ai/PMA-1.3-Rosa-256M 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 "patriotmemory-ai/PMA-1.3-Rosa-256M" \ --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": "patriotmemory-ai/PMA-1.3-Rosa-256M", "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 "patriotmemory-ai/PMA-1.3-Rosa-256M" \ --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": "patriotmemory-ai/PMA-1.3-Rosa-256M", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use patriotmemory-ai/PMA-1.3-Rosa-256M with Docker Model Runner:
docker model run hf.co/patriotmemory-ai/PMA-1.3-Rosa-256M
Download tokenizer_config.json from patriotmemory-ai/PMA-1.3-Rosa-256M: direct link, hf CLI and curl.
- Browser
- Download file 492 Bytes
-
https://huggingface.co/patriotmemory-ai/PMA-1.3-Rosa-256M/resolve/main/tokenizer_config.json
- Command line
-
hf download hf://patriotmemory-ai/PMA-1.3-Rosa-256M/tokenizer_config.json
-
curl -L -o tokenizer_config.json https://huggingface.co/patriotmemory-ai/PMA-1.3-Rosa-256M/resolve/main/tokenizer_config.json
492 Bytes
| { | |
| "tokenizer_class": "PMA3Tokenizer", | |
| "auto_map": { | |
| "AutoTokenizer": [ | |
| "tokenization_pma3.PMA3Tokenizer", | |
| null | |
| ] | |
| }, | |
| "model_max_length": 4096, | |
| "eos_token": "~~", | |
| "bos_token": "~~", | |
| "unk_token": "", | |
| "pad_token": "", | |
| "chat_template": "{% for message in messages %}{{ message['role'] + '\\n' + message['content'] + '\\n' }}{% endfor %}{% if add_generation_prompt %}{{ 'assistant\\n' }}{% endif %}", | |
| "clean_up_tokenization_spaces": false, | |
| "legacy": true | |
| } |