Text Generation
Transformers
Safetensors
Japanese
plamo3
finance
plamo
japanese
conversational
custom_code
Instructions to use pfnet/plamo-3-610m-fin-instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use pfnet/plamo-3-610m-fin-instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="pfnet/plamo-3-610m-fin-instruct", 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("pfnet/plamo-3-610m-fin-instruct", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use pfnet/plamo-3-610m-fin-instruct with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "pfnet/plamo-3-610m-fin-instruct" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "pfnet/plamo-3-610m-fin-instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/pfnet/plamo-3-610m-fin-instruct
- SGLang
How to use pfnet/plamo-3-610m-fin-instruct 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 "pfnet/plamo-3-610m-fin-instruct" \ --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": "pfnet/plamo-3-610m-fin-instruct", "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 "pfnet/plamo-3-610m-fin-instruct" \ --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": "pfnet/plamo-3-610m-fin-instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use pfnet/plamo-3-610m-fin-instruct with Docker Model Runner:
docker model run hf.co/pfnet/plamo-3-610m-fin-instruct
Question about the parameter count
#1
by tokinasin - opened
hi.
Iβm trying to understand what "610M" refers to in the name of this model.
I downloaded the checkpoint and summed the element counts from the tensors in model.safetensors.
and this gives a total of 890,344,960 (β890M) parameters.
import json
import struct
from math import prod
with open("model.safetensors", "rb") as f:
header_size = struct.unpack("<Q", f.read(8))[0]
header = json.loads(f.read(header_size))
count = sum(
prod(tensor["shape"])
for name, tensor in header.items()
if name != "__metadata__"
)
print(f"{count:,}") # 890,344,960
Could you clarify how the 610M figure is counted?
I may be missing something, so any clarification would be appreciated. Thanks!