Instructions to use DeepMount00/Qwen2-1.5B-Ita with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use DeepMount00/Qwen2-1.5B-Ita with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="DeepMount00/Qwen2-1.5B-Ita") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("DeepMount00/Qwen2-1.5B-Ita") model = AutoModelForCausalLM.from_pretrained("DeepMount00/Qwen2-1.5B-Ita") 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 Settings
- vLLM
How to use DeepMount00/Qwen2-1.5B-Ita with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "DeepMount00/Qwen2-1.5B-Ita" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "DeepMount00/Qwen2-1.5B-Ita", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/DeepMount00/Qwen2-1.5B-Ita
- SGLang
How to use DeepMount00/Qwen2-1.5B-Ita 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 "DeepMount00/Qwen2-1.5B-Ita" \ --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": "DeepMount00/Qwen2-1.5B-Ita", "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 "DeepMount00/Qwen2-1.5B-Ita" \ --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": "DeepMount00/Qwen2-1.5B-Ita", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use DeepMount00/Qwen2-1.5B-Ita with Docker Model Runner:
docker model run hf.co/DeepMount00/Qwen2-1.5B-Ita
Fine-tuning this model
Hi! I want to approach the world of language models a little more seriously, so I would like to try finetuning a model. Not experience with this, would you be able to tell me if this model is finetunable further? Or since you have already done your finetuning I might have poor results?
I would like to try finetuning it on a specific task and I have a few hundred prompt-response examples.
Hi! Absolutely, you can further finetune this model for a specific task. I am actually updating the model in a few hours to enhance its understanding of Italian, logical reasoning, and critical thinking. Finetuning on your specific task with a few hundred prompt-response examples should yield decent results, especially after the upcoming updates. Let me know if you need any assistance with the finetuning process!
I will look forward to the update. Thank you very much <3
Regarding training, I currently have a laptop with a rtx 2060 6GB of VRAM, but according to the huggingface space Can-You-Run-It's not enough to train it in fp16, does training it with lower accuracies worsen the quality of training?
I could potentially use a VM on google cloud with a Nvidia L4, how long more or less does it take to finetuning?
Doing rough calculations each prompt-response pair is about 2k tokens, so if I were to have about 300 examples that's 600k tokens
I would prefer to train it on my laptop, since I can take my time and experiment more comfortably. What do you think?