Instructions to use Gensyn/open-1b-sft with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Gensyn/open-1b-sft with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Gensyn/open-1b-sft", 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("Gensyn/open-1b-sft", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Gensyn/open-1b-sft with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Gensyn/open-1b-sft" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Gensyn/open-1b-sft", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Gensyn/open-1b-sft
- SGLang
How to use Gensyn/open-1b-sft 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 "Gensyn/open-1b-sft" \ --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": "Gensyn/open-1b-sft", "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 "Gensyn/open-1b-sft" \ --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": "Gensyn/open-1b-sft", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Gensyn/open-1b-sft with Docker Model Runner:
docker model run hf.co/Gensyn/open-1b-sft
Question about parameter count 1B
Hi! I noticed that the model is named open-1b-sft, but Hugging Face shows 2B parameters. Could you clarify the actual parameter count and why it differs from the model name?
Hey @pengwenzhi good question! open-1b is 1.61B total parameters -- 1.08B non-embedding, which is the figure in the model card farther down.
The 2B parameters in the sidebar is HF's rounded display # of the count it reads from the Safetensors header, so it is rounding 1.61b -> 2b. The 1B in the name itself is the size class which matches the non-embedding count of 1.08B. Other models adopt this convention too -- for example Llama 3.2 1B is actually 1.24B (rounds down).
You can check this in a couple ways: on the file tab you'll see the model.safetensors file is 6.43gb which, stored at F32, is 1.61B parameters. You can also use a curl command on HF's API to see how it computed the number from the header:
curl -s "https://huggingface.co/api/models/Gensyn/open-1b-sft?expand=safetensors" | jq .safetensors
Which returns the parameters object + a 'total'. That total is what gets rounded up to the "2B Params" in that pill you're looking at.
got it !
