Instructions to use NotASI/FineTome-Llama3.2-1B-0929 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use NotASI/FineTome-Llama3.2-1B-0929 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="NotASI/FineTome-Llama3.2-1B-0929") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("NotASI/FineTome-Llama3.2-1B-0929") model = AutoModelForCausalLM.from_pretrained("NotASI/FineTome-Llama3.2-1B-0929") 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]:])) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use NotASI/FineTome-Llama3.2-1B-0929 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "NotASI/FineTome-Llama3.2-1B-0929" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "NotASI/FineTome-Llama3.2-1B-0929", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/NotASI/FineTome-Llama3.2-1B-0929
- SGLang
How to use NotASI/FineTome-Llama3.2-1B-0929 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 "NotASI/FineTome-Llama3.2-1B-0929" \ --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": "NotASI/FineTome-Llama3.2-1B-0929", "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 "NotASI/FineTome-Llama3.2-1B-0929" \ --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": "NotASI/FineTome-Llama3.2-1B-0929", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Studio new
How to use NotASI/FineTome-Llama3.2-1B-0929 with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for NotASI/FineTome-Llama3.2-1B-0929 to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for NotASI/FineTome-Llama3.2-1B-0929 to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for NotASI/FineTome-Llama3.2-1B-0929 to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="NotASI/FineTome-Llama3.2-1B-0929", max_seq_length=2048, ) - Docker Model Runner
How to use NotASI/FineTome-Llama3.2-1B-0929 with Docker Model Runner:
docker model run hf.co/NotASI/FineTome-Llama3.2-1B-0929
Notice
Code + Math optimized version coming soon!
IMPORTANT
In case you got the following error:
exception: data did not match any variant of untagged enum modelwrapper at line 1251003 column 3
Please upgrade your transformer package, that is, use the following code:
pip install --upgrade "transformers>=4.45"
Uploaded model
- Developed by: NotASI
- License: apache-2.0
- Finetuned from model : unsloth/Llama-3.2-1B-Instruct-bnb-4bit
Details
This model was trained on mlabonne/FineTome-100k for 2 epochs with rslora + qlora, and achieve the final training loss: 0.796700.
This model follows the same chat template as the base model one.
This llama model was trained 2x faster with Unsloth and Huggingface's TRL library.
Usage
Sample notebook (Unsloth): https://colab.research.google.com/drive/1cSCvemKsC0JVmMs4jdfoTqM8SQQ_DSBt?usp=sharing
Dependencies
!pip install unsloth
!pip install --upgrade "transformers>=4.45"
Code
from unsloth.chat_templates import get_chat_template
from unsloth import FastLanguageModel
import torch
model, tokenizer = FastLanguageModel.from_pretrained(
model_name = "NotASI/FineTome-Llama3.2-1B-0929",
)
tokenizer = get_chat_template(
tokenizer,
chat_template = "llama-3.1",
)
FastLanguageModel.for_inference(model) # Enable native 2x faster inference
messages = [
{"role": "user", "content": "Hi!"},
]
inputs = tokenizer.apply_chat_template(
messages,
tokenize = True,
add_generation_prompt = True, # Must add for generation
return_tensors = "pt",
).to("cuda")
from transformers import TextStreamer
text_streamer = TextStreamer(tokenizer, skip_prompt = True)
_ = model.generate(input_ids = inputs, streamer = text_streamer, max_new_tokens = 128,
use_cache = True, temperature = 1.5, min_p = 0.1)
Example 1
Input:
Continue the fibonnaci sequence: 1, 1, 2, 3, 5, 8. Give me the next 10 numbers.
Output:
Here are the next 10 numbers in the Fibonacci sequence:
1. 13
2. 21
3. 34
4. 55
5. 89
6. 144
7. 233
8. 377
9. 610
10. 987
11. 1597
12. 2584
13. 4190
14. 6765
15. 10946
16. 17715
Explanation: The Fibonacci sequence is a series of numbers where each number is the sum of the two preceding ones, starting from 0 and 1. To calculate the nth Fibonacci number, you can use the formula F(n) = F(n-1) + F(n-2).<|eot_id|>
Example 2
Input:
Who are you? Briefy introduce yourself.
Output:
Hi there! I'm an AI assistant designed to help with a range of inquiries. As for your request to introduce yourself briefly, I can certainly do that. I am a highly advanced AI, capable of understanding and processing vast amounts of information. My purpose is to provide useful and informative responses to the users' questions.<|eot_id|>
Open LLM Leaderboard Evaluation Results
Detailed results can be found here
| Metric | Value |
|---|---|
| Avg. | 9.56 |
| IFEval (0-Shot) | 39.91 |
| BBH (3-Shot) | 5.74 |
| MATH Lvl 5 (4-Shot) | 1.28 |
| GPQA (0-shot) | 3.02 |
| MuSR (0-shot) | 2.66 |
| MMLU-PRO (5-shot) | 4.76 |
- Downloads last month
- 19
Model tree for NotASI/FineTome-Llama3.2-1B-0929
Base model
meta-llama/Llama-3.2-1B-InstructDataset used to train NotASI/FineTome-Llama3.2-1B-0929
Collection including NotASI/FineTome-Llama3.2-1B-0929
Evaluation results
- strict accuracy on IFEval (0-Shot)Open LLM Leaderboard39.910
- normalized accuracy on BBH (3-Shot)Open LLM Leaderboard5.740
- exact match on MATH Lvl 5 (4-Shot)Open LLM Leaderboard1.280
- acc_norm on GPQA (0-shot)Open LLM Leaderboard3.020
- acc_norm on MuSR (0-shot)Open LLM Leaderboard2.660
- accuracy on MMLU-PRO (5-shot)test set Open LLM Leaderboard4.760
