🌊 Llamarine - Maritime Navigation Model

Llamarine is a specialized large language model fine-tuned for maritime navigation and seamanship. This is a merged version combining the base Llama-3.1-70B model with maritime-specific LoRA adapters.

🚒 Model Details

  • Base Model: meta-llama/Llama-3.1-70B
  • Specialization: Maritime navigation, seamanship, and nautical operations
  • Model Type: Merged (base + LoRA adapters)
  • Model Size: ~70.6B parameters
  • Precision: bfloat16
  • Context Length: 128k tokens

βš“ Maritime Capabilities

This model excels in:

🧭 Navigation & Piloting

  • Celestial navigation principles
  • GPS and electronic navigation
  • Dead reckoning and position fixing
  • Chart reading and interpretation
  • Compass navigation and deviation
  • Tide and current calculations

πŸ›₯️ Ship Operations

  • Anchoring procedures and techniques
  • Docking and undocking maneuvers
  • Ship handling in various conditions
  • Cargo operations and stability
  • Emergency procedures

πŸ“‘ Maritime Communications

  • Radio protocols and procedures
  • Distress and safety communications
  • Port communications
  • International signal codes

βš–οΈ Maritime Law & Regulations

  • International collision regulations (COLREGS)
  • Maritime traffic separation schemes
  • Port state control requirements
  • International maritime conventions

🌊 Weather & Oceanography

  • Weather routing and planning
  • Ocean currents and their effects
  • Storm avoidance techniques
  • Barometric pressure interpretation

πŸš€ Usage

Using Transformers

from transformers import AutoTokenizer, AutoModelForCausalLM
import torch

# Load model and tokenizer
tokenizer = AutoTokenizer.from_pretrained("pentagoniac/llamarine")
model = AutoModelForCausalLM.from_pretrained(
    "pentagoniac/llamarine",
    torch_dtype=torch.bfloat16,
    device_map="auto"
)

# Generate response
prompt = "What is dead reckoning navigation?"
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(
    **inputs,
    max_new_tokens=200,
    temperature=0.7,
    top_p=0.9,
    do_sample=True
)
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(response)

Using vLLM (Recommended for Production)

from vllm import LLM, SamplingParams

# Initialize model
llm = LLM(
    model="pentagoniac/llamarine",
    tensor_parallel_size=2,  # Adjust based on your GPU setup
    dtype="bfloat16",
    gpu_memory_utilization=0.95,  # Use 95% of GPU memory
    max_model_len=8192  # Large context length for extended conversations
)

# Configure sampling
sampling_params = SamplingParams(
    temperature=0.7,
    top_p=0.9,
    max_tokens=2000
)

# Generate response
prompt = "How do you anchor a ship in rough weather?"
outputs = llm.generate([prompt], sampling_params)
print(outputs[0].outputs[0].text)

πŸ“Š Performance

  • Response Speed: 18-20 tokens/second (vLLM on 2x A100)
  • Load Time: ~4 minutes (first load from Hugging Face)
  • Memory Usage: ~65GB per GPU (tensor parallel)
  • Context Length: 128k tokens (configurable, tested with 120k)
  • Maritime Accuracy: Specialized knowledge in nautical operations
  • Safety Focus: Emphasizes safe maritime practices

πŸ’‘ Example Prompts

Navigation Questions

"What is celestial navigation?"
"How do you plot a course using GPS?"
"Explain magnetic compass deviation and variation"
"What are the principles of dead reckoning?"

Ship Operations

"What are the steps for anchoring in emergency conditions?"
"How do you perform a man overboard maneuver?"
"What is the proper procedure for docking in strong winds?"
"How do you calculate cargo stability?"

Safety & Regulations

"What are the COLREGS rules for overtaking?"
"How do you signal distress at sea?"
"What are the requirements for crossing traffic separation schemes?"
"What should you do if you encounter a vessel not under command?"

⚠️ Important Notes

  • Specialized Domain: This model is optimized for maritime topics and may not perform as well on general tasks
  • Safety Critical: Always verify navigation and safety information with official sources
  • Professional Use: Intended for maritime professionals and educational purposes
  • Real-time Operations: Not a substitute for official navigation equipment or procedures
  • Memory Requirements: Tested with 120k context on 2x A100 GPUs; reduce max_model_len if you have memory constraints

πŸ”§ Hardware Requirements

Minimum Requirements

  • RAM: 80GB+ system RAM
  • VRAM: 80GB+ GPU memory (A100 recommended)
  • Storage: 200GB+ available space

Recommended Setup

  • GPUs: 2x NVIDIA A100 (80GB each)
  • RAM: 128GB+ system RAM
  • Storage: NVMe SSD for optimal loading speed

πŸ“š Training Data

This model was fine-tuned on maritime navigation data including:

  • Navigation textbooks and manuals
  • Maritime regulations and procedures
  • Ship handling guides
  • Weather routing resources
  • Emergency response protocols

🀝 Contributing

This model is part of the Llamarine project aimed at advancing AI assistance in maritime operations. For questions or contributions, please reach out through the Hugging Face community.

πŸ“„ License

This model inherits the Llama 2 license from the base model. Please review the license terms before commercial use.

🌊 Fair Winds and Following Seas

"The sea, once it casts its spell, holds one in its net of wonder forever." - Jacques Cousteau

Downloads last month
50
Safetensors
Model size
70.6B params
Tensor type
BF16
Β·
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for pentagoniac/llamarine

Finetuned
(46)
this model