Instructions to use Iker/Neurona-2b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Iker/Neurona-2b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Iker/Neurona-2b") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Iker/Neurona-2b") model = AutoModelForCausalLM.from_pretrained("Iker/Neurona-2b") 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 Iker/Neurona-2b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Iker/Neurona-2b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Iker/Neurona-2b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Iker/Neurona-2b
- SGLang
How to use Iker/Neurona-2b 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 "Iker/Neurona-2b" \ --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": "Iker/Neurona-2b", "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 "Iker/Neurona-2b" \ --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": "Iker/Neurona-2b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Iker/Neurona-2b with Docker Model Runner:
docker model run hf.co/Iker/Neurona-2b
Neurona 2B Beta: Un Modelo de Lenguage en Español
Esta es una versión preliminar del dataset card. El modelo está en desarrollo y no es la versión final. Si quieres saber más sobre este modelo, escribe a iker.garciaf@ehu.eus
Neurona 2B es un modelo de lenguaje en Español. Esta es la primera iteración y un experimento para poner a punto los scripts y la infraestructura.
Neurona 2B ha sido entrenado con los siguiente datasets
- teknium/OpenHermes-2.5
- Iker/OpenHermes-2.5-Spanish
- Iker/Document-Translation-en-es
- Iker/InstructTranslation-EN-ES
- Helsinki-NLP/opus-100 (en-es, only a few examples to reach 1 million instructions)
- projecte-aina/RAG_Multilingual(es only, 3701 examples)
- glaiveai/glaive-code-assistant-v3
- glaiveai/glaive-function-calling-v2
Esta mezcla de datasets en Inglés y Español, permite al modelo adquirir diferentes capacidades, como RAG, function calling, code assistant, question answering, summarization... tanto en Inglés como en Español.
Entrenamiento
Este modelo se ha entrado usando 4xNvidia A100 80Gb y axolotl
![]()
Esta es la configuración usada
base_model: google/gemma-2b
model_type: AutoModelForCausalLM
tokenizer_type: AutoTokenizer
is_falcon_derived_model:
is_llama_derived_model:
is_qwen_derived_model:
is_mistral_derived_model:
load_in_8bit: false
load_in_4bit: false
strict: false
device_map: null
datasets:
- path: /ikerlariak/igarcia945/Mortadelo-Filemon/final_dataset/OpenHermes-2.5-Spanish_fix_gpt.jsonl
type: sharegpt
conversation: chatml
field: conversations
roles:
input:
- system
- gpt
output:
- human
- path: /ikerlariak/igarcia945/Mortadelo-Filemon/final_dataset/OpenHermes-2.5-English.jsonl
type: sharegpt
conversation: chatml
field: conversations
- path: /ikerlariak/igarcia945/Mortadelo-Filemon/final_dataset/glaive-function-calling-v2.jsonl
type: sharegpt
conversation: chatml
field: conversations
roles:
input:
- system
- gpt
- tool
output:
- human
- path: /ikerlariak/igarcia945/Mortadelo-Filemon/final_dataset/glaive-code-assistant-v3-small.jsonl
type: sharegpt
conversation: chatml
field: conversations
roles:
input:
- system
- gpt
output:
- human
chat_template: chatml
dataset_prepared_path: /ikerlariak/igarcia945/Mortadelo-Filemon/gemma-2b-spanish/dataset
shuffle_merged_datasets: true
val_set_size: 0.005
output_dir: /ikerlariak/igarcia945/Mortadelo-Filemon/gemma-2b-spanish/
adapter:
lora_model_dir:
sequence_len: 8192
sample_packing: true
eval_sample_packing: false
pad_to_sequence_len: false
special_tokens:
bos_token: "<|im_start|>"
eos_token: "<|im_end|>"
pad_token: "<|end_of_text|>"
tokens:
- "<|begin_of_text|>"
- "<|end_of_text|>"
- "<|im_start|>"
- "<|im_end|>"
- "<|start_header_id|>"
- "<|end_header_id|>"
- "<tool_call>"
- "<tool_response>"
- "<tools>"
- "</tool_call>"
- "</tool_response>"
- "</tools>"
- "<reserved1>"
- "<reserved2>"
- "<reserved3>"
- "<reserved4>"
neftune_noise_alpha: 5
wandb_project: Mortadelo&Filemon
wandb_entity: igarciaf
wandb_watch:
wandb_name: gemma2b
wandb_log_model:
gradient_accumulation_steps: 32
micro_batch_size: 2
eval_batch_size: 2
num_epochs: 3
optimizer: adamw_torch_fused
lr_scheduler: cosine
learning_rate: 0.00007
train_on_inputs: false
group_by_length: false
bf16: true
fp16: false
tf32: false
gradient_checkpointing: true
early_stopping_patience:
resume_from_checkpoint:
local_rank:
logging_steps: 1
xformers_attention:
flash_attention: true
warmup_ratio: 0.03
evals_per_epoch: 4
eval_table_size:
save_strategy: "no"
debug:
deepspeed: /ikerlariak/igarcia945/Mortadelo-Filemon/train_configs/deepspeed_zero3.json
weight_decay: 0.0
fsdp:
fsdp_config:
special_tokens:
seed: 33
- Downloads last month
- 6
Model tree for Iker/Neurona-2b
Base model
google/gemma-2b