Text Generation
GGUF
PyTorch
Transformers
English
code-generation
codegen
coding
coding-assistant
programming
programming-assistant
developer-tools
developer-assistant
ai-coding
ai-programming
generative-ai
llm
large-language-model
decoder-only
causal-language-model
causal-lm
autoregressive
instruction-tuned
instruction-following
reasoning
reasoning-model
mathematical-reasoning
technical-reasoning
engineering-reasoning
problem-solving
structured-reasoning
domain-specific
domain-specific-llm
specialized-llm
8b
huggingface
open-source
scientific-coding
scientific-programming
scientific-computing
scientific-ai
science-ai
engineering
engineering-ai
engineering-assistant
engineering-copilot
computational-engineering
computer-aided-engineering
cae
cae-ai
simulation-ai
numerical-ai
computational-science
computational-physics
computational-mathematics
applied-mathematics
numerical-computing
numerical-analysis
numerical-methods
numerical-modeling
numerical-simulation
physics-simulation
engineering-simulation
simulation
simulation-modeling
multiphysics
multiphysics-simulation
physics
mechanics
continuum-mechanics
solid-mechanics
fluid-mechanics
pde
partial-differential-equations
pde-solver
discretization
spatial-discretization
numerical-discretization
numerical-pde
computational-pde
differential-equations
boundary-value-problems
boundary-conditions
initial-boundary-value-problem
convergence
numerical-convergence
error-estimation
adaptive-methods
finite-element
finite-elements
finite-element-method
finite-element-analysis
finite-element-mesh
fem
fea
fem-meshing
fea-meshing
computational-mechanics
structural-mechanics
structural-analysis
stress-analysis
strain-analysis
elasticity
solid-mechanics-simulation
structural-simulation
mechanical-engineering
computational-solid-mechanics
cfd
computational-fluid-dynamics
fluid-dynamics
fluid-flow
flow-simulation
fluid-simulation
aerodynamic-simulation
aerodynamics
external-aerodynamics
internal-flow
navier-stokes
finite-volume
finite-volume-method
fvm
cfd-meshing
cfd-mesh
cfd-preprocessing
heat-transfer
thermal-analysis
thermal-simulation
conduction
convection
computational-heat-transfer
thermal-engineering
mesh
meshing
mesh-generation
automatic-meshing
computational-meshing
numerical-meshing
engineering-meshing
simulation-mesh
mesh-generator
mesh-generation-ai
mesh-generation-code
mesh-preprocessing
preprocessing
simulation-preprocessing
cae-preprocessing
geometry-meshing
domain-meshing
discretization-mesh
unstructured-mesh
structured-mesh
hybrid-mesh
triangular-mesh
triangle-mesh
quadrilateral-mesh
quad-mesh
tetrahedral-mesh
tetrahedral-meshing
tet-mesh
hexahedral-mesh
hexahedral-meshing
hex-mesh
prism-mesh
prismatic-mesh
pyramid-mesh
volume-mesh
surface-mesh
2d-mesh
3d-mesh
volumetric-mesh
conformal-mesh
mesh-refinement
local-mesh-refinement
adaptive-mesh-refinement
amr
adaptive-meshing
local-refinement
mesh-size-control
element-size
element-sizing
size-field
mesh-size-field
distance-field
threshold-field
mesh-grading
mesh-transition
mesh-density
mesh-resolution
feature-refinement
boundary-refinement
curvature-refinement
boundary-layer
boundary-layer-mesh
boundary-layer-meshing
inflation-layers
near-wall-mesh
wall-meshing
anisotropic-mesh
anisotropic-meshing
mesh-quality
mesh-quality-analysis
mesh-quality-improvement
mesh-optimization
mesh-smoothing
mesh-repair
mesh-cleanup
mesh-validation
mesh-checking
element-quality
mesh-convergence
mesh-independence
mesh-independence-study
aspect-ratio
skewness
mesh-regularization
geometry
geometry-generation
geometry-modeling
geometry-processing
geometric-modeling
computational-geometry
cad
computer-aided-design
cad-modeling
cad-processing
cad-to-mesh
cad-meshing
cad-import
geometry-to-mesh
geometry-preprocessing
parametric-geometry
procedural-geometry
constructive-solid-geometry
csg
solid-modeling
surface-modeling
brep
boundary-representation
boolean-geometry
boolean-operations
gmsh
gmsh4
gmsh-4
gmsh-4x
gmsh-mesh
gmsh-meshing
gmsh-script
gmsh-scripting
gmsh-code
gmsh-code-generation
gmsh-generator
gmsh-assistant
gmsh-ai
gmsh-geometry
gmsh-geo
gmsh-geo-file
geo-script
geo-file
gmsh-python
gmsh-python-api
gmsh-api
gmsh-sdk
gmsh-fields
gmsh-physical-groups
gmsh-boundary-layer
gmsh-refinement
gmsh-size-fields
gmsh-occ
open-cascade
opencascade
occ
meshio
physical-groups
physical-surfaces
physical-volumes
physical-curves
physical-boundaries
geometry-kernel
mesh-fields
background-field
transfinite-meshing
transfinite
recombination
mesh-recombination
delaunay
frontal-delaunay
advancing-front
aerospace-engineering
aeronautical-engineering
automotive-engineering
civil-engineering
structural-engineering
mechanical-design
mechanical-simulation
fluid-engineering
manufacturing
simulation-engineering
engineering-design
engineering-analysis
solver-preprocessing
preprocessing-workflow
simulation-workflow
cae-workflow
fem-workflow
cfd-workflow
mesh-workflow
geometry-workflow
engineering-workflow
simulation-automation
engineering-automation
cae-automation
mesh-automation
automated-meshing
parametric-meshing
script-generation
python
python-code-generation
python-programming
scientific-python
engineering-python
scripting
code-assistant
code-completion
code-synthesis
program-synthesis
technical-code-generation
scientific-code-generation
engineering-code-generation
simulation-code-generation
domain-specific-code-generation
meshing-assistant
mesh-assistant
simulation-assistant
cae-assistant
fem-assistant
fea-assistant
cfd-assistant
computational-engineering-assistant
scientific-computing-assistant
geometry-assistant
cad-assistant
engineering-code-assistant
conversational

GmshNet-8B-v0.1

GmshNet-8B-v0.1 is an open-source, dense, decoder-only 8B parameter large language model specializing in Gmsh 4.x meshing scripts, designed to produce structured analyses and generate robust geometry meshes through chain-of-thought reasoning.


Quickstart

Install Dependencies

pip install llama-cpp-python

Run Inference

from llama_cpp import Llama

# Input your prompt here
USER_INPUT = """
Create a 2D finite element mesh for a rectangular steel plate measuring 100 mm by 60 mm with a circular hole of radius 10 mm at its center (a classic stress-concentration test case). Refine the mesh around the hole to capture the stress gradient and use a coarser mesh near the outer edges. Define physical groups for the outer boundary and the hole so the mesh can be used for a finite element stress analysis.
"""

def load_model(model_path):
    llm = Llama(
        model_path=model_path,
        n_ctx=32768,
        n_gpu_layers=-1,
        verbose=False
    )
    return llm

def generate_response(llm, user_input):
    formatted_input = f"<gmsh_instruction>{user_input.strip()}</gmsh_instruction>"
    messages = [{"role": "user", "content": formatted_input}]
    response = llm.create_chat_completion(
        messages=messages,
        max_tokens=2000,
        temperature=0.2,
        top_k=20,
        top_p=0.8,
        repeat_penalty=1.1,
        stream=False
    )
    return response['choices'][0]['message']['content']

def run_inference():
    model_path = ""  # Path to your model weights
    llm = load_model(model_path)
    result = generate_response(llm, USER_INPUT)
    print(result)

if __name__ == "__main__":
    run_inference()

Example Output

<think>
I need to analyze this meshing task step by step to create an effective GMSH script.

1. Geometry Requirements:
   - Main domain: 100mm × 60mm rectangular plate
   - Internal feature: Circular hole of radius 10mm at center
   - Need refinement around hole for stress gradient capture
   - Coarser mesh near outer edges

2. Meshing Approach:
   - Unstructured triangular mesh for flexibility
   - Size field to control refinement (finer near hole, coarser near edges)
   - Physical groups for boundaries and hole surface
   - Potential quadrilateral recombination in structured regions if needed

3. Construction Steps:
   a) Create rectangle points and lines
   b) Create circle points and arcs
   c) Define line loops for plate and hole
   d) Create plane surface with hole
   e) Set mesh size fields for refinement
   f) Define physical groups
   g) Generate 2D mesh
</think>
<response>
1. High-level Overview:
   - We'll create a rectangular plate with a circular hole at center
   - Use size field to refine mesh near hole (radius 5mm from center)
   - Coarser mesh grows outward from outer edges
   - Physical groups for boundaries and hole surface

2. Step-by-step Instructions:
   a) Create rectangle points (4 corners)
   b) Connect with lines to form boundary
   c) Create circle points (center + 4 quadrants)
   d) Connect circle points with arcs
   e) Define line loops for plate and hole
   f) Create surface with hole
   g) Set mesh size field with Attractor near hole
   h) Define physical groups
   i) Generate mesh

3. Complete GMSH Script:

```
// Rectangular Plate with Hole - Stress Concentration Test Case

// Geometry Parameters
plate_length = 100;
plate_width = 60;
hole_radius = 10;

// Mesh Sizing Parameters
base_size = 5;          // Base mesh size
hole_refine = 1.0;      // Size at hole center
hole_growth = 2.0;      // Growth rate from hole to outer edges

// Create Rectangle Points
Point(1) = {0, 0, 0, base_size};
Point(2) = {plate_length, 0, 0, base_size};
Point(3) = {plate_length, plate_width, 0, base_size};
Point(4) = {0, plate_width, 0, base_size};

// Create Rectangle Edges
Line(1) = {1, 2};
Line(2) = {2, 3};
Line(3) = {3, 4};
Line(4) = {4, 1};

// Create Hole Points (center + 4 quadrants)
Point(5) = {plate_length/2, plate_width/2, 0, hole_refine}; // Center
Point(6) = {plate_length/2 + hole_radius, plate_width/2, 0, hole_refine};
Point(7) = {plate_length/2, plate_width/2 + hole_radius, 0, hole_refine};
Point(8) = {plate_length/2 - hole_radius, plate_width/2, 0, hole_refine};
Point(9) = {plate_length/2, plate_width/2 - hole_radius, 0, hole_refine};

// Create Hole Arcs
Circle(5) = {6, 5, 7};
Circle(6) = {7, 5, 8};
Circle(7) = {8, 5, 9};
Circle(8) = {9, 5, 6};

// Define Line Loops
Line Loop(1) = {1, 2, 3, 4};    // Outer boundary
Line Loop(2) = {5, 6, 7, 8};     // Hole boundary

// Create Surface with Hole
Plane Surface(1) = {1, 2};

// Mesh Size Field - Refinement near hole
Field[1] = Distance;
Field[1].NodesList = {5};        // Center point of hole
Field[2] = Threshold;
Field[2].IField = 1;
Field[2].LcMin = hole_refine;
Field[2].LcMax = base_size;
Field[2].DistMin = hole_radius;
Field[2].DistMax = plate_length/4;
Background Field = 2;

// Physical Groups
Physical Curve("OuterBoundary", 1) = {1, 2, 3, 4};
Physical Curve("HoleBoundary", 2) = {5, 6, 7, 8};
Physical Surface("Plate", 1) = {1};

// Mesh Settings
Mesh.Algorithm = 6;              // Frontal-Delaunay
Mesh.Smoothing = 5;              // More smoothing iterations

// Generate 2D Mesh
Mesh 2;
```

4. Implementation Notes:
- To run: Open in GMSH → Mesh → 2D
- Adjust parameters at top for different sizes/resolutions
- Visualize geometry (Geometry tab) before meshing to verify
- For quadrilateral mesh near hole, add:
  ```
  Mesh.RecombineAll = 1;
  Mesh.Algorithm = 8; // Delaunay for quads
  ```
- Common errors to avoid:
  - Ensure line loops are properly closed
  - Verify point IDs in circle definitions
  - Check that surface includes both line loops (plate and hole)
</response>

Feedback

Tried the model? We'd love to hear how it went! It takes about a minute:

Share your feedback →

Downloads last month
3,407
GGUF
Model size
8B params
Architecture
qwen2
Hardware compatibility
Log In to add your hardware

2-bit

3-bit

4-bit

5-bit

6-bit

8-bit

16-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support