Instructions to use AIFunOver/SmolLM2-1.7B-Instruct-openvino-fp16 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use AIFunOver/SmolLM2-1.7B-Instruct-openvino-fp16 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="AIFunOver/SmolLM2-1.7B-Instruct-openvino-fp16") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("AIFunOver/SmolLM2-1.7B-Instruct-openvino-fp16") model = AutoModelForMultimodalLM.from_pretrained("AIFunOver/SmolLM2-1.7B-Instruct-openvino-fp16") 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 Settings
- vLLM
How to use AIFunOver/SmolLM2-1.7B-Instruct-openvino-fp16 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "AIFunOver/SmolLM2-1.7B-Instruct-openvino-fp16" # 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-1.7B-Instruct-openvino-fp16", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/AIFunOver/SmolLM2-1.7B-Instruct-openvino-fp16
- SGLang
How to use AIFunOver/SmolLM2-1.7B-Instruct-openvino-fp16 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-1.7B-Instruct-openvino-fp16" \ --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-1.7B-Instruct-openvino-fp16", "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-1.7B-Instruct-openvino-fp16" \ --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-1.7B-Instruct-openvino-fp16", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use AIFunOver/SmolLM2-1.7B-Instruct-openvino-fp16 with Docker Model Runner:
docker model run hf.co/AIFunOver/SmolLM2-1.7B-Instruct-openvino-fp16
Upload all_results.json with huggingface_hub
Browse files- all_results.json +22 -0
all_results.json
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"epoch": 2.996074326092646,
|
| 3 |
+
"eval_logits/chosen": -0.34099623560905457,
|
| 4 |
+
"eval_logits/rejected": -0.3685227334499359,
|
| 5 |
+
"eval_logps/chosen": -310.2510070800781,
|
| 6 |
+
"eval_logps/rejected": -275.43145751953125,
|
| 7 |
+
"eval_loss": 0.587827205657959,
|
| 8 |
+
"eval_rewards/accuracies": 0.6746031641960144,
|
| 9 |
+
"eval_rewards/chosen": 0.01673175022006035,
|
| 10 |
+
"eval_rewards/margins": 0.5906793475151062,
|
| 11 |
+
"eval_rewards/rejected": -0.573947548866272,
|
| 12 |
+
"eval_runtime": 18.8462,
|
| 13 |
+
"eval_samples": 2000,
|
| 14 |
+
"eval_samples_per_second": 106.122,
|
| 15 |
+
"eval_steps_per_second": 3.343,
|
| 16 |
+
"total_flos": 0.0,
|
| 17 |
+
"train_loss": 0.5334697115221363,
|
| 18 |
+
"train_runtime": 7355.3343,
|
| 19 |
+
"train_samples": 61134,
|
| 20 |
+
"train_samples_per_second": 24.935,
|
| 21 |
+
"train_steps_per_second": 0.195
|
| 22 |
+
}
|