Instructions to use mehul945/frappecoder-4b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use mehul945/frappecoder-4b with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3-4B-Base") model = PeftModel.from_pretrained(base_model, "mehul945/frappecoder-4b") - Transformers
How to use mehul945/frappecoder-4b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="mehul945/frappecoder-4b") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("mehul945/frappecoder-4b", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use mehul945/frappecoder-4b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "mehul945/frappecoder-4b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mehul945/frappecoder-4b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/mehul945/frappecoder-4b
- SGLang
How to use mehul945/frappecoder-4b 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 "mehul945/frappecoder-4b" \ --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": "mehul945/frappecoder-4b", "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 "mehul945/frappecoder-4b" \ --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": "mehul945/frappecoder-4b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use mehul945/frappecoder-4b with Docker Model Runner:
docker model run hf.co/mehul945/frappecoder-4b
Download training_args.bin from mehul945/frappecoder-4b: direct link, hf CLI and curl.
- Browser
- Download file 5.71 kB
-
https://huggingface.co/mehul945/frappecoder-4b/resolve/main/training_args.bin
- Command line
-
hf download hf://mehul945/frappecoder-4b/training_args.bin
-
curl -L -o training_args.bin https://huggingface.co/mehul945/frappecoder-4b/resolve/main/training_args.bin
5.71 kB
- Xet hash:
- 5c9aecefa62350f3b66e07977ee1353a454ef769753d5620886721ee7bf4ae19
- Size of remote file:
- 5.71 kB
- SHA256:
- 90ff662ac01c785d9a8b1d725316f11e4e58945973d7f295113460d5d36f2954
·
Xet efficiently stores Large Files inside Git, intelligently splitting files into unique chunks and accelerating uploads and downloads. More info.