Instructions to use amhinson/strudel-coder-0.5b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use amhinson/strudel-coder-0.5b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="amhinson/strudel-coder-0.5b") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("amhinson/strudel-coder-0.5b") model = AutoModelForCausalLM.from_pretrained("amhinson/strudel-coder-0.5b", device_map="auto") 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use amhinson/strudel-coder-0.5b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "amhinson/strudel-coder-0.5b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "amhinson/strudel-coder-0.5b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/amhinson/strudel-coder-0.5b
- SGLang
How to use amhinson/strudel-coder-0.5b 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 "amhinson/strudel-coder-0.5b" \ --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": "amhinson/strudel-coder-0.5b", "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 "amhinson/strudel-coder-0.5b" \ --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": "amhinson/strudel-coder-0.5b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use amhinson/strudel-coder-0.5b with Docker Model Runner:
docker model run hf.co/amhinson/strudel-coder-0.5b
Commit History
-
Upload Qwen2ForCausalLM
Verified signature19728a1 -
Delete onnx
Verified signature8a084b3 -
Upload tokenizer
Verified signature294f4b0 -
Upload Qwen2ForCausalLM
Verified signature30c3e15
-
Upload onnx/model_quantized.onnx with huggingface_hub
Verified signatureaccab18 -
Upload onnx/model.onnx with huggingface_hub
Verified signaturef69f3e0 -
Upload folder using huggingface_hub
Verified signature8df27c3 -
Delete folder onnx with huggingface_hub
Verified signature393de37 -
Upload generation_config.json with huggingface_hub
Verified signatureac0e57c -
Upload onnx/model_quantized.onnx with huggingface_hub
Verified signature841ea8a -
Upload folder using huggingface_hub
Verified signature4283304 -
Adding ONNX file of this model (#2)
- Adding ONNX file of this model (caf26402a1991e025bbe572b4af4dcad780f6f5d)770d6bf -
Upload folder using huggingface_hub
Verified signaturebd2cc75 -
Adding ONNX file of this model (#1)
- Adding ONNX file of this model (4de6c31f39f10a080bdb9d21c145d1d9dd2e3fb2)7101a96 -
Upload folder using huggingface_hub
Verified signature430bb56 -
initial commit
Verified signaturee720915