nguyennm1024 commited on
Commit
ee7c8d1
Β·
verified Β·
1 Parent(s): ee4b322

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +192 -0
README.md ADDED
@@ -0,0 +1,192 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: llama2
3
+ base_model: meta-llama/Llama-3.1-70B-Instruct
4
+ tags:
5
+ - maritime
6
+ - navigation
7
+ - llama
8
+ - merged
9
+ - maritime-navigation
10
+ - seamanship
11
+ - nautical
12
+ language:
13
+ - en
14
+ pipeline_tag: text-generation
15
+ library_name: transformers
16
+ ---
17
+
18
+ # 🌊 Llamarine - Maritime Navigation Model
19
+
20
+ 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-Instruct model with maritime-specific LoRA adapters.
21
+
22
+ ## 🚒 Model Details
23
+
24
+ - **Base Model**: meta-llama/Llama-3.1-70B-Instruct
25
+ - **Specialization**: Maritime navigation, seamanship, and nautical operations
26
+ - **Model Type**: Merged (base + LoRA adapters)
27
+ - **Model Size**: ~140B parameters
28
+ - **Precision**: bfloat16
29
+ - **Context Length**: 2048 tokens
30
+
31
+ ## βš“ Maritime Capabilities
32
+
33
+ This model excels in:
34
+
35
+ ### 🧭 Navigation & Piloting
36
+ - Celestial navigation principles
37
+ - GPS and electronic navigation
38
+ - Dead reckoning and position fixing
39
+ - Chart reading and interpretation
40
+ - Compass navigation and deviation
41
+ - Tide and current calculations
42
+
43
+ ### πŸ›₯️ Ship Operations
44
+ - Anchoring procedures and techniques
45
+ - Docking and undocking maneuvers
46
+ - Ship handling in various conditions
47
+ - Cargo operations and stability
48
+ - Emergency procedures
49
+
50
+ ### πŸ“‘ Maritime Communications
51
+ - Radio protocols and procedures
52
+ - Distress and safety communications
53
+ - Port communications
54
+ - International signal codes
55
+
56
+ ### βš–οΈ Maritime Law & Regulations
57
+ - International collision regulations (COLREGS)
58
+ - Maritime traffic separation schemes
59
+ - Port state control requirements
60
+ - International maritime conventions
61
+
62
+ ### 🌊 Weather & Oceanography
63
+ - Weather routing and planning
64
+ - Ocean currents and their effects
65
+ - Storm avoidance techniques
66
+ - Barometric pressure interpretation
67
+
68
+ ## πŸš€ Usage
69
+
70
+ ### Using Transformers
71
+ ```python
72
+ from transformers import AutoTokenizer, AutoModelForCausalLM
73
+ import torch
74
+
75
+ # Load model and tokenizer
76
+ tokenizer = AutoTokenizer.from_pretrained("nguyennm1024/llamarine")
77
+ model = AutoModelForCausalLM.from_pretrained(
78
+ "nguyennm1024/llamarine",
79
+ torch_dtype=torch.bfloat16,
80
+ device_map="auto"
81
+ )
82
+
83
+ # Generate response
84
+ prompt = "What is dead reckoning navigation?"
85
+ inputs = tokenizer(prompt, return_tensors="pt")
86
+ outputs = model.generate(
87
+ **inputs,
88
+ max_new_tokens=200,
89
+ temperature=0.7,
90
+ top_p=0.9,
91
+ do_sample=True
92
+ )
93
+ response = tokenizer.decode(outputs[0], skip_special_tokens=True)
94
+ print(response)
95
+ ```
96
+
97
+ ### Using vLLM (Recommended for Production)
98
+ ```python
99
+ from vllm import LLM, SamplingParams
100
+
101
+ # Initialize model
102
+ llm = LLM(
103
+ model="nguyennm1024/llamarine",
104
+ tensor_parallel_size=2, # Adjust based on your GPU setup
105
+ dtype="bfloat16"
106
+ )
107
+
108
+ # Configure sampling
109
+ sampling_params = SamplingParams(
110
+ temperature=0.7,
111
+ top_p=0.9,
112
+ max_tokens=200
113
+ )
114
+
115
+ # Generate response
116
+ prompt = "How do you anchor a ship in rough weather?"
117
+ outputs = llm.generate([prompt], sampling_params)
118
+ print(outputs[0].outputs[0].text)
119
+ ```
120
+
121
+ ## πŸ“Š Performance
122
+
123
+ - **Response Speed**: 15-20 tokens/second (vLLM on 2x A100)
124
+ - **Context Awareness**: Maintains conversation history
125
+ - **Maritime Accuracy**: Specialized knowledge in nautical operations
126
+ - **Safety Focus**: Emphasizes safe maritime practices
127
+
128
+ ## πŸ’‘ Example Prompts
129
+
130
+ ### Navigation Questions
131
+ ```
132
+ "What is celestial navigation?"
133
+ "How do you plot a course using GPS?"
134
+ "Explain magnetic compass deviation and variation"
135
+ "What are the principles of dead reckoning?"
136
+ ```
137
+
138
+ ### Ship Operations
139
+ ```
140
+ "What are the steps for anchoring in emergency conditions?"
141
+ "How do you perform a man overboard maneuver?"
142
+ "What is the proper procedure for docking in strong winds?"
143
+ "How do you calculate cargo stability?"
144
+ ```
145
+
146
+ ### Safety & Regulations
147
+ ```
148
+ "What are the COLREGS rules for overtaking?"
149
+ "How do you signal distress at sea?"
150
+ "What are the requirements for crossing traffic separation schemes?"
151
+ "What should you do if you encounter a vessel not under command?"
152
+ ```
153
+
154
+ ## ⚠️ Important Notes
155
+
156
+ - **Specialized Domain**: This model is optimized for maritime topics and may not perform as well on general tasks
157
+ - **Safety Critical**: Always verify navigation and safety information with official sources
158
+ - **Professional Use**: Intended for maritime professionals and educational purposes
159
+ - **Real-time Operations**: Not a substitute for official navigation equipment or procedures
160
+
161
+ ## πŸ”§ Hardware Requirements
162
+
163
+ ### Minimum Requirements
164
+ - **RAM**: 80GB+ system RAM
165
+ - **VRAM**: 80GB+ GPU memory (A100 recommended)
166
+ - **Storage**: 200GB+ available space
167
+
168
+ ### Recommended Setup
169
+ - **GPUs**: 2x NVIDIA A100 (80GB each)
170
+ - **RAM**: 128GB+ system RAM
171
+ - **Storage**: NVMe SSD for optimal loading speed
172
+
173
+ ## πŸ“š Training Data
174
+
175
+ This model was fine-tuned on maritime navigation data including:
176
+ - Navigation textbooks and manuals
177
+ - Maritime regulations and procedures
178
+ - Ship handling guides
179
+ - Weather routing resources
180
+ - Emergency response protocols
181
+
182
+ ## 🀝 Contributing
183
+
184
+ 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.
185
+
186
+ ## πŸ“„ License
187
+
188
+ This model inherits the Llama 2 license from the base model. Please review the license terms before commercial use.
189
+
190
+ ## 🌊 Fair Winds and Following Seas!
191
+
192
+ *"The sea, once it casts its spell, holds one in its net of wonder forever."* - Jacques Cousteau