Instructions to use AIFunOver/SmolLM2-360M-Instruct-openvino-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use AIFunOver/SmolLM2-360M-Instruct-openvino-4bit with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="AIFunOver/SmolLM2-360M-Instruct-openvino-4bit") 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("AIFunOver/SmolLM2-360M-Instruct-openvino-4bit") model = AutoModelForCausalLM.from_pretrained("AIFunOver/SmolLM2-360M-Instruct-openvino-4bit", 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 AIFunOver/SmolLM2-360M-Instruct-openvino-4bit with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "AIFunOver/SmolLM2-360M-Instruct-openvino-4bit" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AIFunOver/SmolLM2-360M-Instruct-openvino-4bit", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/AIFunOver/SmolLM2-360M-Instruct-openvino-4bit
- SGLang
How to use AIFunOver/SmolLM2-360M-Instruct-openvino-4bit 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 "AIFunOver/SmolLM2-360M-Instruct-openvino-4bit" \ --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": "AIFunOver/SmolLM2-360M-Instruct-openvino-4bit", "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 "AIFunOver/SmolLM2-360M-Instruct-openvino-4bit" \ --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": "AIFunOver/SmolLM2-360M-Instruct-openvino-4bit", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use AIFunOver/SmolLM2-360M-Instruct-openvino-4bit with Docker Model Runner:
docker model run hf.co/AIFunOver/SmolLM2-360M-Instruct-openvino-4bit
Download all_results.json from AIFunOver/SmolLM2-360M-Instruct-openvino-4bit: direct link, hf CLI and curl.
- Browser
- Download file 786 Bytes
-
https://huggingface.co/AIFunOver/SmolLM2-360M-Instruct-openvino-4bit/resolve/main/all_results.json
- Command line
-
hf download hf://AIFunOver/SmolLM2-360M-Instruct-openvino-4bit/all_results.json
-
curl -L -o all_results.json https://huggingface.co/AIFunOver/SmolLM2-360M-Instruct-openvino-4bit/resolve/main/all_results.json
786 Bytes
| { | |
| "epoch": 1.9973828840617638, | |
| "eval_logits/chosen": -1.6407532691955566, | |
| "eval_logits/rejected": -1.6968854665756226, | |
| "eval_logps/chosen": -375.6463623046875, | |
| "eval_logps/rejected": -323.7197570800781, | |
| "eval_loss": 0.6348475217819214, | |
| "eval_rewards/accuracies": 0.6190476417541504, | |
| "eval_rewards/chosen": -0.034213583916425705, | |
| "eval_rewards/margins": 0.3567626178264618, | |
| "eval_rewards/rejected": -0.3909761905670166, | |
| "eval_runtime": 22.3598, | |
| "eval_samples": 2000, | |
| "eval_samples_per_second": 89.446, | |
| "eval_steps_per_second": 2.818, | |
| "total_flos": 0.0, | |
| "train_loss": 0.6516540072998911, | |
| "train_runtime": 5944.7081, | |
| "train_samples": 61134, | |
| "train_samples_per_second": 20.568, | |
| "train_steps_per_second": 0.16 | |
| } |