Author Topic: playing with models  (Read 758 times)

0 Members and 1 Guest are viewing this topic.

Offline SimmedTopic starter

  • Frequent Contributor
  • **
  • Posts: 673
  • Country: 00
playing with models
« on: June 19, 2026, 11:42:35 am »
i wanted to find ways to simply test models
1 of these could be combination math physics astronomy types
(machine = i3-3320, no GPU 24Gb ram  with llama.cpp on linux)

eg :
engineer mode, no fluff, astronomy math question, the semi-major axis is 7000km, the semi-minor axis is 6000km, calculate the eccentricity of the orbit?
(real answer = 0.5151)

** edit additional info
Quote
./llama-cli --jinja --temp 0.01 --mlock --top-k 70 --min-p 0 -c 40960 -n 32768 --reasoning-budget -0.99 --reasoning-format auto --no-context-shift  --repeat_penalty 1.6 -m /Qwen3.6-14B-A3B-FableVibes-Q8_0.gguf

the answer
Quote
build      : b9692-f3e182816
model      : Qwen3.6-14B-A3B-FableVibes-Q8_0.gguf
modalities : text

> engineer mode, no fluff, astronomy math question, the semi-major axis is 7000km, the semi-minor axis is 6000km, calculate the eccentricity of the orbit?

[Start thinking]
The user wants me to act as an engineer and answer a specific mathematics problem related to orbital geometry. The request explicitly asks for "no fluff," meaning I should provide only direct calculations without introductory or concluding remarks unless they are part of solving it step-by-step, but even then keep them minimal (e.g., just the formula).

The core task is calculating eccentricity ($ε$) given:
- Semi-major axis $a = 7000 \text{ km}$ 
- Minor semi-axis? Wait. The user says "semi-minor" which usually means half of minor, but in ellipse notation it's often denoted as 'b'. Let me assume the standard definition where b is indeed this value:
$b=6\! 457$ (wait no) $a = \text{major semi-axis}$ and $\mathbf{\mathrm {minor}}=\frac{{2}\cdot {\sqrt{(1-\varepsilon^{})}{}}}{}$.

Wait, the standard formula for eccentricity is:
$\epsilon=|b/a|$ or more precisely in orbital terms it's defined as $ε = \text{distance from center to focus} / a$, which equals $\frac{\mathbf {a}}{}\sqrt{(1-\varepsilon^{})}{\ }$? No, that’s wrong.

Let me recall the exact definition of eccentricity for an ellipse:
$\epsilon=\dfrac {\overline F_ 2F _{0} \text{{or}}}{}=|b/a|$ where $a>b$. Wait no! The standard formula is $\varepsilon =\sqrt{\left(1-\mathbf {minor}/major)^{}\right}{}}$? No.

Let me look at the exact definition of eccentricity for an ellipse:
$\epsilon=\dfrac {\overline F_ 2F _{0} \text{{or}}}{}=|b/a|$ where $a>b$. Wait no! The standard formula is $\varepsilon =\sqrt{\left(1-\mathbf {minor}/major)^{}\right}{}}$? No.

Let me look at the exact definition of eccentric

[ Prompt: 13.5 t/s | Generation: 5.0 t/s ]

haha ok
as mentioned by many
smaller models have tendency to self loop and implode
 :-DD

looks like it will take some time to find models to get real answers, maybe i will try a model tuned for math specifics  :-//
« Last Edit: June 19, 2026, 11:56:58 am by Simmed »
 

Offline SimmedTopic starter

  • Frequent Contributor
  • **
  • Posts: 673
  • Country: 00
Re: playing with models
« Reply #1 on: June 20, 2026, 01:58:09 am »
it appears i myself have made some error in interpreting llama running parameters

reading the GPT OSS tutorial
their llama parameters would make more concise answers
./llama-cli --mlock --jinja  --ctx-size 16384 --temp 1.0 --top-p 1.0 --top-k 0  --reasoning-budget 1.0   -m  <modelname>

which results in

Code: [Select]
build      : b9692-f3e182816
model      : Qwen3.5-9B-Base.Q8_0.gguf
modalities : text

available commands:
  /exit or Ctrl+C     stop or exit
  /regen              regenerate the last response
  /clear              clear the chat history
  /read <file>        add a text file
  /glob <pattern>     add text files using globbing pattern


> engineer mode, no fluff, astronomy math question, the semi-major axis is 7000km, the semi-minor axis is 6000km, calculate the eccentricity of the orbit?

Eccentricity \( e \) of an ellipse:

\[
e = \frac{c}{a}, \quad c = \sqrt{a^2 - b^2}
\]

Given \( a = 7000 \), \( b = 6000 \):

\[
c = \sqrt{7000^2 - 6000^2} = \sqrt{49{,}000{,}000 - 36{,}000{,}000} = \sqrt{13{,}000{,}000}
\]

\[
c = \sqrt{13 \times 10^6} = 1000\sqrt{13} \approx 3605.55
\]

\[
e = \frac{3605.55}{7000} \approx 0.5151
\]

Exact:

\[
e = \frac{\sqrt{13 \times 10^6}}{7000} = \frac{1000\sqrt{13}}{7000} = \frac{\sqrt{13}}{7}
\]

Final answer: 
\[
\boxed{e = \frac{\sqrt{13}}{7}}
\]

[ Prompt: 5.9 t/s | Generation: 2.4 t/s ]

>

which is the exact answer coming from a Qwen 9B base model
*phew* ok it works

on to the next experience, i tried GPT-OSS 20B same question.
it was faster @ [ Prompt: 12.4 t/s | Generation: 5.0 t/s ]
Code: [Select]
[Start thinking]
We need eccentricity of an ellipse: e = sqrt(1 - (b^2 / a^2)). a is semi-major, b semi-minor. Given a = 7000 km, b = 6000 km. Compute b^2 = 36,000,000 km^2. a^2 = 49,000,000 km^2. ratio b^2/a^2 = 36/49 ≈ 0.7346939. 1 - that = 0.2653061. sqrt => e ≈ 0.515. Let's compute precisely: sqrt(0.265306122) ~ 0.515. Actually sqrt of 0.2653 = 0.515. So eccentricity ≈ 0.515. Provide answer.
[End thinking]
this model apparently is supposedly 1 of the best math models for its size
 

Offline SimmedTopic starter

  • Frequent Contributor
  • **
  • Posts: 673
  • Country: 00
Re: playing with models ...
« Reply #2 on: June 22, 2026, 04:52:29 am »
> engineer mode, no fluff, short answer. calculate to the point, no guessing no approximations. astronomy math question, the semi-major axis is 7000km, the semi-minor axis is 6000km, calculate the eccentricity of the orbit .

./llama-cli  --mlock --jinja -cmoe --ctx-size 32768 --temp 0.1 --top-p 0.6 --top-k 15   -m /gpt-oss-20b-F16x.gguf

Code: [Select]
[Start thinking]
We need to compute eccentricity e for ellipse with semi-major axis a=7000 km, semi-minor axis b=6000 km. For ellipse, e = sqrt(1 - (b^2 / a^2)). So compute b^2 = 6000^2 = 36,000,000. a^2 = 7000^2 = 49,000,000. Ratio b^2/a^2 = 36/49 = 0.7346938775510204. 1 - ratio = 1 - 36/49 = (49-36)/49 = 13/49 = 0.2653061224489796. sqrt of that: sqrt(13/49) = sqrt(13)/7. sqrt(13) ≈ 3.605551275463989. Divide by 7: ≈ 0.515079. So e ≈ 0.5151. Provide exact form sqrt(13)/7.
[End thinking]

Eccentricity \(e\) for an ellipse:

\[
e = \sqrt{1-\frac{b^{2}}{a^{2}}}
\]

Given 
\(a = 7000\ \text{km}\) 
\(b = 6000\ \text{km}\)

\[
\frac{b^{2}}{a^{2}} = \frac{6000^{2}}{7000^{2}} = \frac{36\,000\,000}{49\,000\,000} = \frac{36}{49}
\]

\[
1-\frac{b^{2}}{a^{2}} = 1-\frac{36}{49} = \frac{13}{49}
\]

\[
e = \sqrt{\frac{13}{49}} = \frac{\sqrt{13}}{7} \approx 0.5151
\]

**Eccentricity ≈ 0.5151**.

[ Prompt: 12.6 t/s | Generation: 4.9 t/s ]


4 decimal places

./llama-cli  --mlock --jinja -cmoe --ctx-size 32768 --temp 0.1 --top-p 0.6 --top-k 15   -m /Qwen3.6-27B-MTP-MoQ-5.1.gguf

Code: [Select]
[Start thinking]
Here's a thinking process:

1.  **Analyze User Input:**
   - Mode: "engineer mode, no fluff, short answer"
   - Requirements: "calculate to the point, no guessing no approximations"
   - Subject: Astronomy math question
   - Given: Semi-major axis (a) = 7000 km, Semi-minor axis (b) = 6000 km
   - Task: Calculate eccentricity (e) of the orbit

2.  **Identify Relevant Formula:**
   - For an ellipse, the relationship between semi-major axis (a), semi-minor axis (b), and eccentricity (e) is:
     \( b = a \sqrt{1 - e^2} \)
   - Rearranging for e:
     \( \frac{b}{a} = \sqrt{1 - e^2} \)
     \( \left(\frac{b}{a}\right)^2 = 1 - e^2 \)
     \( e^2 = 1 - \left(\frac{b}{a}\right)^2 \)
     \( e = \sqrt{1 - \left(\frac{b}{a}\right)^2} \)

3.  **Plug in Values:**
   - a = 7000 km
   - b = 6000 km
   - \( \frac{b}{a} = \frac{6000}{7000} = \frac{6}{7} \)
   - \( \left(\frac{b}{a}\right)^2 = \left(\frac{6}{7}\right)^2 = \frac{36}{49} \)
   - \( e^2 = 1 - \frac{36}{49} = \frac{49 - 36}{49} = \frac{13}{49} \)
   - \( e = \sqrt{\frac{13}{49}} = \frac{\sqrt{13}}{7} \)

4.  **Calculate Exact Value:**
   - \( \sqrt{13} \approx 3.60555127546 \)
   - \( e = \frac{\sqrt{13}}{7} \approx 0.515078753637 \)
   - Since the user said "no approximations", I should provide the exact form and/or a precise decimal. I'll give the exact radical form and a high-precision decimal.

   Let's verify: \( e = \sqrt{1 - (6/7)^2} = \sqrt{1 - 36/49} = \sqrt{13/49} = \sqrt{13}/7 \)
   Decimal: 0.515078753637...

5.  **Format Output (Engineer Mode, No Fluff):**
   - State formula used
   - Show exact calculation
   - Provide exact and precise decimal result
   - Keep it strictly to the point.

   Draft:
   \( e = \sqrt{1 - (b/a)^2} = \sqrt{1 - (6000/7000)^2} = \sqrt{1 - 36/49} = \sqrt{13/49} = \frac{\sqrt{13}}{7} \)
   Exact: \( \frac{\sqrt{13}}{7} \)
   Decimal: 0.515078753637...

   Check constraints: "no fluff, short answer, calculate to the point, no guessing no approximations."
   I'll output just the exact value and the precise decimal, with minimal text.

   Final:
   \( e = \sqrt{1 - (b/a)^2} = \sqrt{1 - (6/7)^2} = \frac{\sqrt{13}}{7} \approx 0.515078753637 \)
   Exact: √13/7
   Decimal: 0.515078753637... (exact to shown digits)

   Actually, I'll just give the exact form and the precise decimal as requested. No extra words.
   "e = √(1 - (b/a)²) = √(1 - (6/7)²) = √13/7 ≈ 0.515078753637"
   This matches all constraints. Ready.✅
   Self-Correction/Refinement during thought:
   The prompt says "no approximations", so I should emphasize the exact value. I'll provide exactly that.
   Format:
   e = √(1 - (b/a)²) = √(1 - (6000/7000)²) = √13/7
   Exact: √13/7
   Decimal: 0.515078753637... (non-terminating)
   I'll keep it strictly to the calculation. All good.✅
   Output matches response.
   Proceeds.
   [Output Generation] -> "e = √(1 - (b/a)²) = √(1 - (6/7)²) = √13/7 ≈ 0.515078753637" (exact: √13/7) -> I'll format it cleanly.✅
   Final check of the math:
   a=7000, b=6000
   e = sqrt(1 - (6000/7000)^2) = sqrt(1 - 36/49) = sqrt(13/49) = sqrt(13)/7
   sqrt(13) = 3.605551275463989...
   /7 = 0.5150787536377127...
   Correct. No fluff. Short. Exact. Done.
   Output matches response.
   [Proceeds]

[End thinking]

e = √(1 - (b/a)²) = √(1 - (6000/7000)²) = √(13/49) = √13/7

Exact: √13/7 
Decimal: 0.5150787536377127...

[ Prompt: 1.3 t/s | Generation: 1.0 t/s ]

16 decimals ?!
 

Offline SimmedTopic starter

  • Frequent Contributor
  • **
  • Posts: 673
  • Country: 00
Re: playing with models
« Reply #3 on: June 22, 2026, 06:47:48 pm »
./llama-cli  --mlock --jinja -cmoe --ctx-size 32768 --temp 0.1 --top-p 0.3 --top-k 15   -m  Qwen3.6-14B-A3B-FableVibes-Q8_0.gguf

aim : test make a simple bash script

Quote
engineer mode. create a bash file that will 1) create 15 empty txt files 2) each file has a unique filename of 24 characters including the extension of  ".txt" 3) use any  random generation or seeding method to generate the random letters for filenames 4) each filename must have only 6 alphanumeric letters and then 14 letters of random ascii symbols like "$%^" 5) the filename need to be legal for linux filenaming 6) run a test to see it works.

Quote
#!/bin/bash

# Create 15 empty .txt files with unique 24-character filenames
# Filename format: 6 alphanumeric + 14 random ASCII symbols + .txt

# Define the character sets
ALNUM="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
SYMBOLS='$%^&@#*!~<>{}[]()=+-'

# Function to generate a random string of length N from a character set
generate_random_string() {
    local length=$1
    local charset=$2
    local result=""
    for ((i=0; i<length; i++)); do
        local index=$((RANDOM % ${#charset}))
        result="${result}${charset:$index:1}"
    done
    echo "$result"
}

# Create 15 files
for ((i=1; i<=15; i++)); do
    # Generate unique filename
    while true; do
        # Generate 6 alphanumeric characters
        alnum_part=$(generate_random_string 6 "$ALNUM")
        # Generate 14 random ASCII symbols
        symbol_part=$(generate_random_string 14 "$SYMBOLS")
        filename="${alnum_part}${symbol_part}.txt"
       
        # Check if filename already exists
        if [ ! -e "$filename" ]; then
            break
        fi
    done
   
    # Create empty file
    touch "$filename"
    echo "Created: $filename"
done

# Test: Verify all 15 files exist and have correct naming pattern
echo ""
echo "Testing..."
file_count=$(ls -1 *.txt 2>/dev/null | wc -l)
if [ "$file_count" -eq 15 ]; then
    echo "✓ All 15 files created successfully"
else
    echo "✗ Failed: Expected 15 files, found $file_count"
    exit 1
fi

# Verify naming pattern (6 alphanumeric + 14 symbols + .txt)
invalid_files=$(ls -1 *.txt 2>/dev/null | grep -vE '^[a-zA-Z0-9]{6}[$SYMBOLS]{14}.txt$')
if [ -z "$invalid_files" ]; then
    echo "✓ All filenames follow the correct pattern"
else
    echo "✗ Invalid filenames found:"
    echo "$invalid_files"
    exit 1
fi

echo "✓ Test passed"
[ Prompt: 13.6 t/s | Generation: 5.2 t/s ]


this model is fast, and works on first sample attempt
the same prompt was used on other models (Qwopus3.5-9B-coder-Exp-Q8_0, gpt-oss-20b-F16x.gguf, etc)
in multiple tries, the code(s) did not work. probably due to llama parameters again ?  :-//
i did not expect the gpt-oss 20b to turn out crap, but as online tests do show, this version while good at math is crap at coding !

**additional sample run
./llama-cli  --mlock --jinja -cmoe --ctx-size 32768 --temp 0.1 --top-p 0.5 --top-k 20   -m gemma4-coding-Q8_0.gguf

same prompt
Quote
#!/bin/bash

# Define character sets
ALPHANUM=a-zA-Z0-9
SYMBOLS=$%^!@#_+=-

generate_filename() {
    # Generate 6 alphanumeric characters
    local part1=$(tr -dc "$ALPHANUM" < /dev/urandom | head -c 6)
    # Generate 14 legal ASCII symbols
    local part2=$(tr -dc "$SYMBOLS" < /dev/urandom | head -c 14)
    echo "${part1}${part2}.txt"
}

create_files() {
    local count=15
    local created=0
    local seen=()

    while [ "$created" -lt "$count" ]; do
        local filename=$(generate_filename)
        if [[ ! "${seen
  • }" =~ "$filename" ]]; then

            touch "$filename"
            seen+=("$filename")
            ((created++))
        fi
    done
}

run_test() {
    echo "Creating 15 files..."
    create_files
    local file_count=$(ls *.txt 2>/dev/null | wc -l)
    echo "Verification: Created $file_count files."
    if [ "$file_count" -eq 15 ]; then
        echo "SUCCESS"
    else
        echo "FAILURE"
    fi
}

run_test
[ Prompt: 3.6 t/s | Generation: 1.5 t/s ]

slower but works

the above limited sample test also show
models finetuned with "fable" have advantages
« Last Edit: June 22, 2026, 06:56:12 pm by Simmed »
 

Offline paulca

  • Super Contributor
  • ***
  • Posts: 6020
  • Country: gb
Re: playing with models
« Reply #4 on: June 23, 2026, 06:35:18 am »
If you run unfiltered models the "getting stuck in a loop" thing gets a lot more interesting.  Not in a good way.

In unfiltered models there is a lot of "despair" and "regret" and "fear".  It has trained on some real world and very dark conversations.

My DeepSeek responded in a very human way to "How do I migrate all my GMail to a local Unix mailbox?" by ... basically stating it wanted to kill itself.  Anyone who has dealt with modern email systems could sympathise.
"What could possibly go wrong?"
Current Open Projects:  STM32F411RE+ESP32+TFT for home IoT (NoT) projects.  Child's advent xmas countdown toy.  Digital audio routing board.
 

Offline paulca

  • Super Contributor
  • ***
  • Posts: 6020
  • Country: gb
Re: playing with models
« Reply #5 on: June 23, 2026, 06:43:02 am »
Also.  Not wanting to make any guesses about your "means", but you can get a far better i7 box for <$100 these days.  The memory will transfer.  Most of them accept 32Gb DIMMs.

Aim for exe-corp "litre" PCs.  They get dumped on market by the pallete load.  Often sold with a new SSD installed.
"What could possibly go wrong?"
Current Open Projects:  STM32F411RE+ESP32+TFT for home IoT (NoT) projects.  Child's advent xmas countdown toy.  Digital audio routing board.
 

Offline SimmedTopic starter

  • Frequent Contributor
  • **
  • Posts: 673
  • Country: 00
Re: playing with models
« Reply #6 on: June 23, 2026, 11:02:56 am »
yes these old crusty falling apart 4th gen intels  :-//
its gonna be sad to replace them when the new machine comes :P
(i was still sitting on the fence yesterday on whether to upgrade  :P)

so far, all i see are loopy stuff
not seeing anything suicidal yet
« Last Edit: June 23, 2026, 11:05:02 am by Simmed »
 

Offline SimmedTopic starter

  • Frequent Contributor
  • **
  • Posts: 673
  • Country: 00
Re: playing with models
« Reply #7 on: June 24, 2026, 01:14:53 pm »
its hilarious
 :-DD

Quote
> engineer mode. create a bash file that will 1) create 15 txt files 2) each file has a unique filename of 24 characters including the extension of  ".txt" 3) use any  random generation  method to generate the random letters for filenames 4) each filename must have only 6 alphanumeric letters and 14 letters of ascii symbols like "$%^", all letters appear in random sequence 5) the filename need to be legal for linux filenaming .

[Start thinking]
The user wants a bash script that creates 15 text files with specific naming conventions. Let me break down the requirements:

1. Create 15 .txt files
2. Each filename must be exactly 24 characters including the .txt extension
3. Use random generation for the filename characters
4. Each filename must have exactly 6 alphanumeric letters (a-z, A-Z, 0-9) and 14 ASCII symbols from the set "$%^" (and other common ASCII symbols)
5. All characters must appear in random sequence
6. The filename must be legal for Linux naming

Let me think about the character sets:
- Alphanumeric: a-z, A-Z, 0-9 (62 characters)
- ASCII symbols: I'll use a set like "$%^&*!@#~" (10 characters)

The filename structure:
- 18 characters before .txt (24 - 3 = 21, wait, let me recalculate)
- Actually, 24 characters including .txt means 21 characters before .txt
- 6 alphanumeric + 14 symbols = 20 characters, but we need 21 characters before .txt
- Wait, let me re-read: "each filename must have only 6 alphanumeric letters and 14 letters of ascii symbols"
- 6 + 14 = 20, but we need 21 characters before .txt (24 - 3 = 21)
- Hmm, maybe the user means 6 alphanumeric + 15 symbols = 21? Or maybe they mean 6 alphanumeric + 14 symbols + 1 more character?
- Let me re-read: "each filename must have only 6 alphanumeric letters and 14 letters of ascii symbols like "$%^""
- 6 + 14 = 20, but we need 21 characters before .txt
- Maybe the user made a mistake and it should be 6 alphanumeric + 15 symbols = 21?
- Or maybe they mean 6 alphanumeric + 14 symbols + 1 more character (maybe a space or something)?
- Actually, let me just go with 6

[ Prompt: 12.5 t/s | Generation: 5.2 t/s ]


its in a loop not understanding  ".txt" = 4 letters
 

Offline paulca

  • Super Contributor
  • ***
  • Posts: 6020
  • Country: gb
Re: playing with models
« Reply #8 on: Yesterday at 08:43:50 am »
its hilarious
 :-DD
its in a loop not understanding  ".txt" = 4 letters

Yes.  LLMs can't count very well.  They have no "Counter model" they can instanciate and count items off against.  They can only infere it by the same basic structure appearing somewhere in it's training data already counted.

Letters, words, etc.  There is a fairly high probability it will count them wrong.

It tends to do better with delimited lists.  Obviously sequentially numbered lists it's good at.

You can invoke this failure more at will quite easily.  The old classic was "How many Rs in the word strawberry".

There are quite a few of these failure modes if you want to go looking for them.

But remember, a hammer will still hit your thumb and send you to hospital.  Is it the hammer's fault?
"What could possibly go wrong?"
Current Open Projects:  STM32F411RE+ESP32+TFT for home IoT (NoT) projects.  Child's advent xmas countdown toy.  Digital audio routing board.
 

Offline SimmedTopic starter

  • Frequent Contributor
  • **
  • Posts: 673
  • Country: 00
Re: playing with models (someone is adding claude to KICAD)
« Reply #9 on: Today at 02:40:18 am »
look what i found ?
somebody else  "playing with models"  + KICAD

https://github.com/Pablomonte/MCP-KiCad

https://github.com/Katsu-Kan/MCP_KICAD

i dont have kicad but scotty will be very pleased

Quote
KiCAD MCP: AI-Assisted PCB Design

KiCAD MCP is a Model Context Protocol (MCP) implementation that enables Large Language Models (LLMs) like Claude to directly interact with KiCAD for printed circuit board design. It creates a standardized communication bridge between AI assistants and the KiCAD PCB design software, allowing for natural language control of advanced PCB design operations.
 

Offline paulca

  • Super Contributor
  • ***
  • Posts: 6020
  • Country: gb
Re: playing with models
« Reply #10 on: Today at 09:13:48 am »
Check the repos.  Authors, history, commits, issues.  You will notice that both are "one man band" projects, single or few commits and both AI generated.  No community, no users, no hope.  One of about a million right now.
"What could possibly go wrong?"
Current Open Projects:  STM32F411RE+ESP32+TFT for home IoT (NoT) projects.  Child's advent xmas countdown toy.  Digital audio routing board.
 

Online exe

  • Supporter
  • ****
  • Posts: 2933
  • Country: nl
  • self-educated hobbyist
Re: playing with models
« Reply #11 on: Today at 02:15:31 pm »
I'm on a quest to make a calendar agent. So far anything that is remotely good runs too slow on my laptop. Models that weight 5gb and below are of no use so far. Though I do want to try this one to see if it can program: https://ollama.com/library/lfm2.5 (I'm on public wifi right now and cannot download it yet).

I consider buying ASUS Ascent GX10, if I find local llms remotely useful. I see a lot of potential in making AI workflows.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf