Text Generation
Transformers
Safetensors
English
llama
function-calling
tool-use
git
cli
code-assistant
distillation
conversational
text-generation-inference
Instructions to use distil-labs/Distil-gitara-v2-Llama-3.2-3B-Instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use distil-labs/Distil-gitara-v2-Llama-3.2-3B-Instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="distil-labs/Distil-gitara-v2-Llama-3.2-3B-Instruct") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("distil-labs/Distil-gitara-v2-Llama-3.2-3B-Instruct") model = AutoModelForCausalLM.from_pretrained("distil-labs/Distil-gitara-v2-Llama-3.2-3B-Instruct", 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use distil-labs/Distil-gitara-v2-Llama-3.2-3B-Instruct with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "distil-labs/Distil-gitara-v2-Llama-3.2-3B-Instruct" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "distil-labs/Distil-gitara-v2-Llama-3.2-3B-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/distil-labs/Distil-gitara-v2-Llama-3.2-3B-Instruct
- SGLang
How to use distil-labs/Distil-gitara-v2-Llama-3.2-3B-Instruct 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 "distil-labs/Distil-gitara-v2-Llama-3.2-3B-Instruct" \ --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": "distil-labs/Distil-gitara-v2-Llama-3.2-3B-Instruct", "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 "distil-labs/Distil-gitara-v2-Llama-3.2-3B-Instruct" \ --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": "distil-labs/Distil-gitara-v2-Llama-3.2-3B-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use distil-labs/Distil-gitara-v2-Llama-3.2-3B-Instruct with Docker Model Runner:
docker model run hf.co/distil-labs/Distil-gitara-v2-Llama-3.2-3B-Instruct
update readme
Browse files
README.md
CHANGED
|
@@ -18,51 +18,50 @@ pipeline_tag: text-generation
|
|
| 18 |
---
|
| 19 |
|
| 20 |
<div align="center">
|
| 21 |
-
<img src="https://
|
| 22 |
</div>
|
| 23 |
|
| 24 |
-
|
| 25 |
|
| 26 |
<div align="center">
|
| 27 |
-
<table
|
| 28 |
<tr>
|
| 29 |
-
<td>
|
| 30 |
<a href="https://www.distillabs.ai/?utm_source=hugging-face&utm_medium=referral&utm_campaign=distil-gitara">
|
| 31 |
-
<img src="https://
|
| 32 |
</a>
|
| 33 |
</td>
|
| 34 |
-
<td>
|
| 35 |
<a href="https://github.com/distil-labs">
|
| 36 |
-
<img src="https://
|
| 37 |
</a>
|
| 38 |
</td>
|
| 39 |
-
<td>
|
| 40 |
<a href="https://huggingface.co/distil-labs">
|
| 41 |
-
<img src="https://
|
| 42 |
</a>
|
| 43 |
</td>
|
| 44 |
-
|
|
|
|
|
|
|
| 45 |
<a href="https://www.linkedin.com/company/distil-labs/">
|
| 46 |
-
<img src="https://
|
| 47 |
</a>
|
| 48 |
</td>
|
| 49 |
-
|
| 50 |
-
<tr>
|
| 51 |
-
<td colspan="2" align="center">
|
| 52 |
<a href="https://distil-labs-community.slack.com/join/shared_invite/zt-36zqj87le-i3quWUn2bjErRq22xoE58g">
|
| 53 |
-
<img src="https://
|
| 54 |
</a>
|
| 55 |
</td>
|
| 56 |
-
<td
|
| 57 |
<a href="https://x.com/distil_labs">
|
| 58 |
-
<img src="https://
|
| 59 |
</a>
|
| 60 |
</td>
|
| 61 |
</tr>
|
| 62 |
</table>
|
| 63 |
</div>
|
| 64 |
|
| 65 |
-
|
| 66 |
---
|
| 67 |
|
| 68 |
# Llama-3.2-Gitara-3B
|
|
|
|
| 18 |
---
|
| 19 |
|
| 20 |
<div align="center">
|
| 21 |
+
<img src="https://github.com/distil-labs/badges/blob/main/distillabs-logo.svg?raw=true" width="40%" alt="distil labs" />
|
| 22 |
</div>
|
| 23 |
|
| 24 |
+
---
|
| 25 |
|
| 26 |
<div align="center">
|
| 27 |
+
<table>
|
| 28 |
<tr>
|
| 29 |
+
<td align="center">
|
| 30 |
<a href="https://www.distillabs.ai/?utm_source=hugging-face&utm_medium=referral&utm_campaign=distil-gitara">
|
| 31 |
+
<img src="https://github.com/distil-labs/badges/blob/main/badge-distillabs-home.svg?raw=true" alt="Homepage"/>
|
| 32 |
</a>
|
| 33 |
</td>
|
| 34 |
+
<td align="center">
|
| 35 |
<a href="https://github.com/distil-labs">
|
| 36 |
+
<img src="https://github.com/distil-labs/badges/blob/main/badge-github.svg?raw=true" alt="GitHub"/>
|
| 37 |
</a>
|
| 38 |
</td>
|
| 39 |
+
<td align="center">
|
| 40 |
<a href="https://huggingface.co/distil-labs">
|
| 41 |
+
<img src="https://github.com/distil-labs/badges/blob/main/badge-huggingface.svg?raw=true" alt="Hugging Face"/>
|
| 42 |
</a>
|
| 43 |
</td>
|
| 44 |
+
</tr>
|
| 45 |
+
<tr>
|
| 46 |
+
<td align="center">
|
| 47 |
<a href="https://www.linkedin.com/company/distil-labs/">
|
| 48 |
+
<img src="https://github.com/distil-labs/badges/blob/main/badge-linkedin.svg?raw=true" alt="LinkedIn"/>
|
| 49 |
</a>
|
| 50 |
</td>
|
| 51 |
+
<td align="center">
|
|
|
|
|
|
|
| 52 |
<a href="https://distil-labs-community.slack.com/join/shared_invite/zt-36zqj87le-i3quWUn2bjErRq22xoE58g">
|
| 53 |
+
<img src="https://github.com/distil-labs/badges/blob/main/badge-slack.svg?raw=true" alt="Slack"/>
|
| 54 |
</a>
|
| 55 |
</td>
|
| 56 |
+
<td align="center">
|
| 57 |
<a href="https://x.com/distil_labs">
|
| 58 |
+
<img src="https://github.com/distil-labs/badges/blob/main/badge-twitter.svg?raw=true" alt="Twitter"/>
|
| 59 |
</a>
|
| 60 |
</td>
|
| 61 |
</tr>
|
| 62 |
</table>
|
| 63 |
</div>
|
| 64 |
|
|
|
|
| 65 |
---
|
| 66 |
|
| 67 |
# Llama-3.2-Gitara-3B
|