Instructions to use Mielikki/juno-3b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Mielikki/juno-3b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Mielikki/juno-3b", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Mielikki/juno-3b", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("Mielikki/juno-3b", trust_remote_code=True) 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use Mielikki/juno-3b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Mielikki/juno-3b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Mielikki/juno-3b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Mielikki/juno-3b
- SGLang
How to use Mielikki/juno-3b 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 "Mielikki/juno-3b" \ --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": "Mielikki/juno-3b", "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 "Mielikki/juno-3b" \ --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": "Mielikki/juno-3b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Mielikki/juno-3b with Docker Model Runner:
docker model run hf.co/Mielikki/juno-3b
juno
Finetune of jpacifico/Chocolatine-3B-Instruct-DPO-Revised for function calling with fallback.
template
<|system|>
{{array of functions available}}<|end|>
<|user|>
{{user question}}<|end|>
<|assistant|>
see below for complete examples.
function available
<|system|>
[{"name":"check_stock_availability","description":"Check the availability of products in stock","parameters":{"product_id":{"description":"the product id to check availability for","type":"int"}}},{"name":"help","description":"If no other tool is appropriate, use this","parameters":{"query":{"description":"the user's prompt","type":"str"}}},{"name":"convert_currency","description":"Converts one currency to another","parameters":{"amount":{"description":"currency amount","type":"int"},"currency_1":{"description":"currency to convert from e.g. USD","type":"str"},"currency_2":{"description":"currency to convert to e.g. EUR","type":"str"}}}]<|end|>
<|user|>
Hi, how much is $30 worth in iraq?<|end|>
<|assistant|>
[{"name": "convert_currency", "arguments": {"amount": 30, "currency_1": "USD", "currency_2": "IQD"}}]<|end|>
no function; fallback
<|system|>
[{"name":"check_stock_availability","description":"Check the availability of products in stock","parameters":{"product_id":{"description":"the product id to check availability for","type":"int"}}},{"name":"help","description":"If no other tool is appropriate, use this","parameters":{"query":{"description":"the user's prompt","type":"str"}}},{"name":"convert_currency","description":"Converts one currency to another","parameters":{"amount":{"description":"currency amount","type":"int"},"currency_1":{"description":"currency to convert from e.g. USD","type":"str"},"currency_2":{"description":"currency to convert to e.g. EUR","type":"str"}}}]<|end|>
<|user|>
Hi, how much calories in an apple?<|end|>
<|assistant|>
[{"name": "help", "arguments": {"query": "How many calories are in an apple?"}}]<|end|>
fallback should still be handled by the target backend, this usually will be a search engine, but you could also integrate it into a knowledge base etc.
- Downloads last month
- 4
