Instructions to use Scottie201/custom_model_trained with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Scottie201/custom_model_trained with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Scottie201/custom_model_trained") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Scottie201/custom_model_trained") model = AutoModelForCausalLM.from_pretrained("Scottie201/custom_model_trained") 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 Scottie201/custom_model_trained with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Scottie201/custom_model_trained" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Scottie201/custom_model_trained", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Scottie201/custom_model_trained
- SGLang
How to use Scottie201/custom_model_trained 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 "Scottie201/custom_model_trained" \ --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": "Scottie201/custom_model_trained", "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 "Scottie201/custom_model_trained" \ --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": "Scottie201/custom_model_trained", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Scottie201/custom_model_trained with Docker Model Runner:
docker model run hf.co/Scottie201/custom_model_trained
docker model run hf.co/Scottie201/custom_model_trainedfine-tuned-custom-model
This model is a fine-tuned version of HuggingFaceTB/SmolLM2-1.7B-Instruct on the Scottie201 dataset.
It achieves the following results on the evaluation set:
- Loss: 2.3012
- Evaluation Runtime: 125.50 seconds
- Evaluation Samples per Second: 0.096
- Evaluation Steps per Second: 0.048
Model description
This is a fine-tuned version of the HuggingFaceTB/SmolLM2-1.7B-Instruct model, trained to handle custom tasks related to text generation. The model can handle a wide range of text completion, summarization, and question-answering tasks.
Intended uses & limitations
The model can be used for tasks like:
- Text generation
- Question answering
- Summarization
- General text-based tasks
Limitations:
- May not work well for domain-specific tasks that were not part of the training data.
- Performance on unseen data may vary depending on the domain of the query.
Training and evaluation data
The model was trained and evaluated on the Scottie201 dataset, which includes various text-based tasks. The evaluation was carried out after 2 epochs of training.
Training procedure
Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 1e-05
- train_batch_size: 2
- eval_batch_size: 2
- seed: 42
- optimizer: Use adamw_torch with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- num_epochs: 2
Training results
| Training Loss | Epoch | Step | Validation Loss |
|---|---|---|---|
| 2.4066 | 1.0 | 25 | 2.3138 |
| 2.3976 | 2.0 | 50 | 2.3012 |
Evaluation results
| Evaluation Metric | Value |
|---|---|
| Loss | 2.3012 |
| Runtime | 125.50 sec |
| Samples per Second | 0.096 |
| Steps per Second | 0.048 |
Framework versions
- Transformers: 4.48.3
- PyTorch: 2.6.0+cu124
- Datasets: 3.2.0
- Tokenizers: 0.21.0
This model card now includes detailed information about the evaluation procedure, training results, and evaluation results such as loss, runtime, and throughput. The evaluation metric table provides clarity on how the model performed during evaluation.
Let me know if you'd like any more adjustments or additional details!
- Downloads last month
- -
Model tree for Scottie201/custom_model_trained
Base model
HuggingFaceTB/SmolLM2-1.7B
# Gated model: Login with a HF token with gated access permission hf auth login