Text Generation
Transformers
PyTorch
Safetensors
English
llama
text-generation-inference
alphaaico
qwen
reasoning
thought
reflection
lite
GRPO
conversational
Instructions to use alpha-ai/llama-3.2-3B-Reason-Reflect-Lite with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use alpha-ai/llama-3.2-3B-Reason-Reflect-Lite with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="alpha-ai/llama-3.2-3B-Reason-Reflect-Lite") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("alpha-ai/llama-3.2-3B-Reason-Reflect-Lite") model = AutoModelForCausalLM.from_pretrained("alpha-ai/llama-3.2-3B-Reason-Reflect-Lite", 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 alpha-ai/llama-3.2-3B-Reason-Reflect-Lite with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "alpha-ai/llama-3.2-3B-Reason-Reflect-Lite" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "alpha-ai/llama-3.2-3B-Reason-Reflect-Lite", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/alpha-ai/llama-3.2-3B-Reason-Reflect-Lite
- SGLang
How to use alpha-ai/llama-3.2-3B-Reason-Reflect-Lite 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 "alpha-ai/llama-3.2-3B-Reason-Reflect-Lite" \ --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": "alpha-ai/llama-3.2-3B-Reason-Reflect-Lite", "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 "alpha-ai/llama-3.2-3B-Reason-Reflect-Lite" \ --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": "alpha-ai/llama-3.2-3B-Reason-Reflect-Lite", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use alpha-ai/llama-3.2-3B-Reason-Reflect-Lite with Docker Model Runner:
docker model run hf.co/alpha-ai/llama-3.2-3B-Reason-Reflect-Lite
Update README.md
Browse files
README.md
CHANGED
|
@@ -16,8 +16,17 @@ language:
|
|
| 16 |
- en
|
| 17 |
datasets:
|
| 18 |
- openai/gsm8k
|
|
|
|
| 19 |
---
|
| 20 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
# Uploaded Model
|
| 22 |
|
| 23 |
- **Developed by:** alphaaico
|
|
@@ -119,4 +128,4 @@ print("Model converted to safetensors successfully.")
|
|
| 119 |
```
|
| 120 |
Alternatively, you can use our GGUF models, which are optimized for inference with llama.cpp, exllama, and other efficient runtimes. GGUF provides better performance on CPU/GPU and is a more portable option for deployment.
|
| 121 |
|
| 122 |
-
Choose the format that best suits your security, performance, and deployment needs.
|
|
|
|
| 16 |
- en
|
| 17 |
datasets:
|
| 18 |
- openai/gsm8k
|
| 19 |
+
pipeline_tag: text-generation
|
| 20 |
---
|
| 21 |
|
| 22 |
+
<div align="center">
|
| 23 |
+
<img src="https://cdn-uploads.huggingface.co/production/uploads/669777597cb32718c20d97e9/4emWK_PB-RrifIbrCUjE8.png"
|
| 24 |
+
alt="Title card"
|
| 25 |
+
style="width: 500px;
|
| 26 |
+
height: auto;
|
| 27 |
+
object-position: center top;">
|
| 28 |
+
</div>
|
| 29 |
+
|
| 30 |
# Uploaded Model
|
| 31 |
|
| 32 |
- **Developed by:** alphaaico
|
|
|
|
| 128 |
```
|
| 129 |
Alternatively, you can use our GGUF models, which are optimized for inference with llama.cpp, exllama, and other efficient runtimes. GGUF provides better performance on CPU/GPU and is a more portable option for deployment.
|
| 130 |
|
| 131 |
+
Choose the format that best suits your security, performance, and deployment needs.
|