Run this model with HF Jobs
Run Azurro/APT-1B-Base on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/Azurro/APT-1B-Base. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/Azurro/APT-1B-Base on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/Azurro/APT-1B-Base. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/Azurro/APT-1B-Base. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use Azurro/APT-1B-Base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Azurro/APT-1B-Base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Azurro/APT-1B-Base")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Azurro/APT-1B-Base") model = AutoModelForCausalLM.from_pretrained("Azurro/APT-1B-Base", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Azurro/APT-1B-Base with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Azurro/APT-1B-Base" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Azurro/APT-1B-Base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Azurro/APT-1B-Base
- SGLang
How to use Azurro/APT-1B-Base 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 "Azurro/APT-1B-Base" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Azurro/APT-1B-Base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "Azurro/APT-1B-Base" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Azurro/APT-1B-Base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Azurro/APT-1B-Base with Docker Model Runner:
docker model run hf.co/Azurro/APT-1B-Base
Commit ·
cadc6fe
1
Parent(s): 6fb9f0c
Update README.md
Browse files12 unmodified lines131415161718192021222311 unmodified lines353637383940413 unmodified lines4546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091923 unmodified lines9697989910010110211 unmodified lines11411511611711811912012112212312412512612712812913013113213313412 unmodified lines# APT-1B-Base### IntroductionAt [Azurro](https://azurro.pl), we consistently place importance on using the Open Source technologies, both while working on the projects and in our everyday lives. We have decided to share a base language model trained by us. We are confident that smaller language models have great potential, and direct access to them for all people that are interested in such models democratizes this significant and dynamically changing field even more.### StatementsTraining large language models requires a lot of computing power and it is meant for the major players on the market. However, does it mean that individuals or small companies cannot train language models capable of performing specific tasks? We decided to answer this question and train our own language model from scratch.We have made the following statements:11 unmodified linesIt is important to remember that models are as good as the data with which they are trained. Having regard to the small size of the model, we trained it with carefully selected texts. This is why we have not used corpora such as Common Crawl that contain a lot of poor quality data. Our team has prepared a set of sources that then have been processed and used for training the model.### ModelAPT-1B-Base is a base model introducing a new series of the APT (Azurro Pretrained Transformer) models. It has been trained with the use of an original open source framework called [ALLaMo](https://github.com/chrisociepa/allamo). This framework allows the user to train language models similar to the Meta AI’s LLaMA models quickly and efficiently.3 unmodified linesA special tokenizer has been prepared and trained for the purpose of training the model.Model description:* developed by [Azurro](https://azurro.pl)* language: Polish* model type: causal decoder-only* license: CC BY NC 4.0 (non-commercial use)Model details:* model parameters: 1060M* sequence length: 2048* vocabulary size: 8000* layers: 20* heads: 16* d_head: 128* d_model: 2048* dropout: 0.0* no bias* positional encoding: RoPE* activation function: SwiGLU* normalizing function: RMSNorm* intermediate size: 5632* norm epsilon: 1e-06Training hyperparameters:* micro batch size: 1* gradient accumulation steps: 264* batch size: 540672 = 1 * 264 * 2048* learning rate: 3e-04* optimizer: AdamW, (β1, β2) = (0.9, 0.95), adam_eps = 1e−8* weight decay: 0.1* grad clip: 1.0Tokenizer details:* type: BPE* special tokens: 7* alphabet size: 112* vocabulary size: 8000### Training datasetCollecting a large amount of high quality training data is a great challenge. Over the past years at Azurro, we have done a lot of projects connected with processing Big Data. Therefore, with our extensive experience, we have been able to prepare carefully selected training dataset quickly and efficiently.3 unmodified lines* Polish Wikipedia: 970 million tokens* web crawl data: 813 million tokens# How to UseOur model is fully compatible with HuggingFace - you can use it right away.11 unmodified linesmodel = transformers.AutoModelForCausalLM.from_pretrained('Azurro/APT-1B-Base', torch_dtype=torch.bfloat16)```### Limitations and BiasesAPT-1B-Base is not intended for deployment without fine-tuning. It should not be used for human-facing interactions without further guardrails and user consent.APT-1B-Base can produce factually incorrect output, and should not be relied on to produce factually accurate information. APT-1B-Base was trained on various public datasets. While great efforts have been taken to clean the pretraining data, it is possible that this model could generate lewd, biased or otherwise offensive outputs.### LicenseBecause of an unclear legal situation, we have decided to publish the model under CC BY NC 4.0 license - it allows for non-commercial use. The model can be used for scientific purposes and privately, as long as the license conditions are met.### DisclaimerThe license on this model does not constitute legal advice. We are not responsible for the actions of third parties who use this model.### CitationPlease cite this model using the following format:```12 unmodified lines131415161718192021222311 unmodified lines353637383940413 unmodified lines454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011023 unmodified lines10610710810911011111211 unmodified lines12412512612712812913013113213313413513613713813914014114214314412 unmodified lines# APT-1B-Base## IntroductionAt [Azurro](https://azurro.pl), we consistently place importance on using the Open Source technologies, both while working on the projects and in our everyday lives. We have decided to share a base language model trained by us. We are confident that smaller language models have great potential, and direct access to them for all people that are interested in such models democratizes this significant and dynamically changing field even more.## StatementsTraining large language models requires a lot of computing power and it is meant for the major players on the market. However, does it mean that individuals or small companies cannot train language models capable of performing specific tasks? We decided to answer this question and train our own language model from scratch.We have made the following statements:11 unmodified linesIt is important to remember that models are as good as the data with which they are trained. Having regard to the small size of the model, we trained it with carefully selected texts. This is why we have not used corpora such as Common Crawl that contain a lot of poor quality data. Our team has prepared a set of sources that then have been processed and used for training the model.## ModelAPT-1B-Base is a base model introducing a new series of the APT (Azurro Pretrained Transformer) models. It has been trained with the use of an original open source framework called [ALLaMo](https://github.com/chrisociepa/allamo). This framework allows the user to train language models similar to the Meta AI’s LLaMA models quickly and efficiently.3 unmodified linesA special tokenizer has been prepared and trained for the purpose of training the model.### Model description:* **Developed by:** [Azurro](https://azurro.pl)* **Language:** Polish* **Model type:** causal decoder-only* **License:** CC BY NC 4.0 (non-commercial use)### Model details:| **Hyperparameter** | **Value** ||--------------------|-------------|| Model Parameters | 1060M || Sequence Length | 2048 || Vocabulary Size | 8000 || Layers | 20 || Heads | 16 || d_head | 128 || d_model | 2048 || Dropout | 0.0 || Bias | No || Positional Encoding | RoPE || Activation Function | SwiGLU || Normalizing Function | RMSNorm || Intermediate Size | 5632 || Norm Epsilon | 1e-06 |### Tokenizer details:* type: BPE* special tokens: 7* alphabet size: 112* vocabulary size: 8000## Training### Training hyperparameters:| **Hyperparameter** | **Value** ||-----------------------------|------------------|| Micro Batch Size | 1 || Gradient Accumulation Steps | 264 || Batch Size | 540672 || Learning Rate | 3e-04 || Optimizer | AdamW || β1, β2 | 0.9, 0.95 || Adam_eps | 1e−8 || Weight Decay | 0.1 || Grad Clip | 1.0 |### DatasetCollecting a large amount of high quality training data is a great challenge. Over the past years at Azurro, we have done a lot of projects connected with processing Big Data. Therefore, with our extensive experience, we have been able to prepare carefully selected training dataset quickly and efficiently.3 unmodified lines* Polish Wikipedia: 970 million tokens* web crawl data: 813 million tokens## How to UseOur model is fully compatible with HuggingFace - you can use it right away.11 unmodified linesmodel = transformers.AutoModelForCausalLM.from_pretrained('Azurro/APT-1B-Base', torch_dtype=torch.bfloat16)```## Limitations and BiasesAPT-1B-Base is not intended for deployment without fine-tuning. It should not be used for human-facing interactions without further guardrails and user consent.APT-1B-Base can produce factually incorrect output, and should not be relied on to produce factually accurate information. APT-1B-Base was trained on various public datasets. While great efforts have been taken to clean the pretraining data, it is possible that this model could generate lewd, biased or otherwise offensive outputs.## LicenseBecause of an unclear legal situation, we have decided to publish the model under CC BY NC 4.0 license - it allows for non-commercial use. The model can be used for scientific purposes and privately, as long as the license conditions are met.## DisclaimerThe license on this model does not constitute legal advice. We are not responsible for the actions of third parties who use this model.## CitationPlease cite this model using the following format:```
README.md+51-41